回复: Scons-users Digest, V ol 144, Issue 11
"Yu,Zhiwei (YFI,Shanghai,CN)" <[email protected]> Wed, 27 Sep 2023 14:33:01 +0000
| Newsgroups | gmane.comp.programming.tools.scons.user |
|---|---|
| Message-ID | <TY2PR04MB3342F16D63EEF11152152BEBEBC2A@TY2PR04MB3342.apcprd04.prod.outlook.com> |
Thank you, Mats and Steve. I think I can try to collect all of the stdout meaasge from compiler. And then, filte them. If I make any progress, I will send email. Best Regards! 于志伟 Software Engineer 延锋科技 ------------------------------------ [email protected]<mailto:[email protected]> [YF_logo_PNG] ________________________________ 发件人: Scons-users <[email protected]> 代表 [email protected] <[email protected]> 发送时间: 2023年9月27日 13:37 收件人: [email protected] <[email protected]> 主题: Scons-users Digest, Vol 144, Issue 11 CAUTION: This email originated from outside of the organization. DO NOT click links or open attachments unless you recognize the sender and know the content is safe. Send Scons-users mailing list submissions to [email protected] To subscribe or unsubscribe via the World Wide Web, visit https://pairlist4.pair.net/mailman/listinfo/scons-users or, via email, send a message with subject or body 'help' to [email protected] You can reach the person managing the list at [email protected] When replying, please edit your Subject line so it is more specific than "Re: Contents of Scons-users digest..." Today's Topics: 1. Re: ??: Scons-users Digest, Vol 144, Issue 8 (Steve Hill (Wireless)) ---------------------------------------------------------------------- Message: 1 Date: Tue, 26 Sep 2023 12:29:22 +0000 From: "Steve Hill (Wireless)" <[email protected]> To: SCons users mailing list <[email protected]> Subject: Re: [Scons-users] ??: Scons-users Digest, Vol 144, Issue 8 Message-ID: <BY1PR18MB5327271276C4A02D83795AA2D1C3A@BY1PR18MB5327.namprd18.prod.outlook.com> Content-Type: text/plain; charset="utf-8" As Mats has said, the issue is not restricted to Python - all spawned process can also output to stdout and, by default, all this output can interleave in arbitrary ways. We've got round this by overloading the function used to spawn a sub-process such that it captures the output from the tool and outputs it to stdout only having taken a Lock that is used for all output during the build phase. This has the added advantage that, for some tools that are very chatty and don't provide a way to quieten them down, we can filter out the noise and only output the parts that are useful information for the user. S. -----Original Message----- From: Scons-users <[email protected]> On Behalf Of Mats Wichmann Sent: Monday, September 25, 2023 6:28 PM To: SCons users mailing list <[email protected]> Subject: Re: [Scons-users] ??: Scons-users Digest, Vol 144, Issue 8 EXTERNAL EMAIL: Do not click links or open attachments unless you know and trust the sender. On 9/25/23 08:54, Eric Fahlgren wrote: > On Mon, Sep 25, 2023 at 3:23?AM Yu,Zhiwei (YFI,Shanghai,CN) > <[email protected] <mailto:[email protected]>> wrote: > > Hi Guys, > > I find that if I set -j8, the printing messages sequence > will be disordered. > I think the reason is python print buffer has competition > in multithreading. Am I right? > And how can I resolve it. > > > As each subprocess has something to say, it says it. This is normal > and expected for anything other that -j1. If you have a requirement > that the output messages be sequential, then your only solution is to > turn off multiple subprocesses and use -j1. It's not clear exactly what the problem is. Will add these notes: * SCons chooses the build order to best resolve the depndency graph. That means things may not be built in the order you expect - that's one possible form of out-of-order, and nothing to worry about. * SCons prints its own message for each action, if those are too noisy you can change what it prints, which might look clearer (if you don't need the details). Those messages should not interfere with one another, as those are happening inside Python. * SCons has no control at all over what external commands output or when they do, so those might indeed interleave, it multiple theads are in use. For many commands, they don't actually say anything unless something is wrong, but some are more talkative. _______________________________________________ Scons-users mailing list [email protected] https://urldefense.com/v3/__https://pairlist4.pair.net/mailman/listinfo/scons-users__;!!Niha4SQ!8DFMhe-xBuct_VbHF8evvWm7JbYsnsbMRSvV2N1nhGWN5ErmmuF0kZKEUINOlQW1wMSYrmFoxmOmNkF8qobUjsj5$ ------------------------------ Subject: Digest Footer _______________________________________________ Scons-users mailing list [email protected] https://pairlist4.pair.net/mailman/listinfo/scons-users ------------------------------ End of Scons-users Digest, Vol 144, Issue 11 ******************************************** _______________________________________________ Scons-users mailing list [email protected] https://pairlist4.pair.net/mailman/listinfo/scons-users
Outlook-YF_logo_PN.png
(image/png, 5.3 KB) - not displayed