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
merged 1 commit into from
Apr 4, 2019

Conversation

JeffBezanson
Copy link
Member

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 added io Involving the I/O subsystem: libuv, read, write, etc. multithreading Base.Threads and related functionality labels Mar 21, 2019
@JeffBezanson JeffBezanson changed the base branch from jn/kp/partr2 to master March 22, 2019 17:39
@JeffBezanson JeffBezanson force-pushed the jb/threadio branch 2 times, most recently from 0eb3168 to d44feb5 Compare April 1, 2019 20:15
@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
start adding some synchronization to I/O

this yields basic support for printing to TTYs from multiple threads
@JeffBezanson JeffBezanson merged commit 0136fa1 into master Apr 4, 2019
@JeffBezanson JeffBezanson deleted the jb/threadio branch April 4, 2019 03:09
check_open(s)
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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Labels
io Involving the I/O subsystem: libuv, read, write, etc. multithreading Base.Threads and related functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants