Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

basic support for printing to TTYs from multiple threads #31438

merged 1 commit into from Apr 4, 2019


Copy link

commented Mar 21, 2019

Together with #31398 and #31437 this allows printing to work from @threads loops. Currently, it just has threads poll for I/O instead of blocking during @threads. That will be fixed. It also does not yet make all I/O thread safe, but you can at least print to TTYs.

@JeffBezanson JeffBezanson force-pushed the jb/threadio branch from 681d93d to b9d36ae Mar 22, 2019

@JeffBezanson JeffBezanson changed the base branch from jn/kp/partr2 to master Mar 22, 2019

@JeffBezanson JeffBezanson force-pushed the jb/threadio branch 2 times, most recently from 0eb3168 to d44feb5 Mar 29, 2019

@JeffBezanson JeffBezanson changed the title WIP: basic support for printing to TTYs from multiple threads basic support for printing to TTYs from multiple threads Apr 1, 2019

allow any thread, one at a time, to block in the event loop
start adding some synchronization to I/O

this yields basic support for printing to TTYs from multiple threads

@JeffBezanson JeffBezanson force-pushed the jb/threadio branch from d44feb5 to 55f0367 Apr 3, 2019

@JeffBezanson JeffBezanson merged commit 0136fa1 into master Apr 4, 2019

11 of 12 checks passed

continuous-integration/travis-ci/pr The Travis CI build failed
buildbot/package_freebsd64 Run complete
buildbot/package_linux32 Run complete
buildbot/package_linux64 Run complete
buildbot/package_macos64 Run complete
buildbot/package_win64 Run complete
buildbot/tester_freebsd64 Run complete
buildbot/tester_linux32 Run complete
buildbot/tester_linux64 Run complete
buildbot/tester_macos64 Run complete
buildbot/tester_win64 Run complete
continuous-integration/appveyor/pr AppVeyor build succeeded

@JeffBezanson JeffBezanson deleted the jb/threadio branch Apr 4, 2019

while true
uvw = Libc.malloc(_sizeof_uv_write)
uv_req_set_data(uvw, C_NULL) # in case we get interrupted before arriving at the wait call
uv_req_set_data(uvw, reqdata)

This comment has been minimized.

Copy link

vtjnash Apr 4, 2019


please don't delete comments that say precisely why your change is wrong

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.