Repository navigation
0.13.3: the environment read from two contexts at once; a pipe's bounded read measured - #37
Merged
Merged
Conversation
… finding it empty Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…ng its sleeps Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two defects measured through mcpplibs.os and mcpp.
preparemarked them ready before filling them. Two contexts that asked at the same moment met there: one filled while the other read them empty, so a variable that was set was reported absent. Measured in mcpp's unit test of concurrent launches: of two threads startinghostnameandpingtogether, one found its program "not on PATH". The tables are now filled once under a slim lock (SRWLOCK, static and all-zero), which every caller takes.tests/environment_read_from_two_threads.cppstarts twenty fresh copies, in each of which two contexts released together make the first enquiry; under wine it fails in 3 of 20 copies on 0.13.2 and passes with the fix.await_pipecounted itsSleep(1)calls as milliseconds, andSleep(1)lasts until the next tick of the system timer (15.6 ms by default), so a 100 ms bound waited about 1.5 s. Measured through mcpplibs.os: a 100 ms read of standard input received input written 400 ms after it began. The time passed is now read from the performance counter.tests/bounded_read_of_an_idle_pipe.cpprequires a 100 ms read of an idle channel to expire within 400 ms (wine'sSleep(1)is one millisecond, so only a real Windows runner can fail it on 0.13.2).Co-authored-by: speak-agent 248744407+speak-agent@users.noreply.github.com