Fix race condition
parent
418e8410c7
commit
230e9476a7
|
@ -24,8 +24,13 @@ TUPLE: fd fd disposed ;
|
||||||
[ >>fd ]
|
[ >>fd ]
|
||||||
tri ;
|
tri ;
|
||||||
|
|
||||||
M: fd dispose*
|
M: fd dispose
|
||||||
[ cancel-operation ] [ fd>> close-file ] bi ;
|
dup disposed>> [ drop ] [
|
||||||
|
[ cancel-operation ]
|
||||||
|
[ t >>disposed drop ]
|
||||||
|
[ fd>> close-file ]
|
||||||
|
tri
|
||||||
|
] if ;
|
||||||
|
|
||||||
M: fd handle-fd dup check-disposed fd>> ;
|
M: fd handle-fd dup check-disposed fd>> ;
|
||||||
|
|
||||||
|
|
|
@ -24,8 +24,10 @@ TUPLE: win32-file < win32-handle ptr ;
|
||||||
: <win32-file> ( handle -- win32-file )
|
: <win32-file> ( handle -- win32-file )
|
||||||
win32-file new-win32-handle ;
|
win32-file new-win32-handle ;
|
||||||
|
|
||||||
M: win32-file dispose*
|
M: win32-file dispose
|
||||||
[ cancel-operation ] [ call-next-method ] bi ;
|
dup disposed>> [ drop ] [
|
||||||
|
[ cancel-operation ] [ call-next-method ] bi
|
||||||
|
] if ;
|
||||||
|
|
||||||
HOOK: CreateFile-flags io-backend ( DWORD -- DWORD )
|
HOOK: CreateFile-flags io-backend ( DWORD -- DWORD )
|
||||||
HOOK: FileArgs-overlapped io-backend ( port -- overlapped/f )
|
HOOK: FileArgs-overlapped io-backend ( port -- overlapped/f )
|
||||||
|
|
Loading…
Reference in New Issue