mirror of
https://github.com/ruby/ruby.git
synced 2025-09-21 03:24:00 +02:00
* include/ruby/io.h (rb_io_t): added write_lock to serialize.
[ruby-core:19668] * gc.c (gc_mark_children): mark write_lock. * gc.c (rb_gc_call_finalizer_at_exit): Mutex also needs to be deferred. * io.c (io_fflush, io_binwrite, fptr_finalize): serializes writing. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20144 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
f8cdd9907a
commit
551dfe9d8b
4 changed files with 89 additions and 21 deletions
|
@ -73,6 +73,7 @@ typedef struct rb_io_t {
|
|||
VALUE writeconv_pre_ecopts;
|
||||
int writeconv_initialized;
|
||||
|
||||
VALUE write_lock;
|
||||
} rb_io_t;
|
||||
|
||||
#define HAVE_RB_IO_T 1
|
||||
|
@ -133,6 +134,7 @@ typedef struct rb_io_t {
|
|||
fp->encs.enc2 = NULL;\
|
||||
fp->encs.ecflags = 0;\
|
||||
fp->encs.ecopts = Qnil;\
|
||||
fp->write_lock = 0;\
|
||||
} while (0)
|
||||
|
||||
FILE *rb_io_stdio_file(rb_io_t *fptr);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue