1
0
mirror of https://github.com/janet-lang/janet synced 2024-12-22 22:40:26 +00:00

Revert dccb60b to address #1299

This commit was to address issues with a use after free error in the
windows event loop, but the erroneous code was later reworked.
This commit is contained in:
Calvin Rose 2023-10-03 00:14:25 -05:00
parent 51a75e1872
commit eea8aa555f
2 changed files with 2 additions and 6 deletions

View File

@ -383,7 +383,7 @@ Usually, one of a few reasons:
### Can I bind to Rust/Zig/Go/Java/Nim/C++/D/Pascal/Fortran/Odin/Jai/(Some new "Systems" Programming Language)? ### Can I bind to Rust/Zig/Go/Java/Nim/C++/D/Pascal/Fortran/Odin/Jai/(Some new "Systems" Programming Language)?
Probably, if that language has a good interface with C. But the programmer may need to do Probably, if that language has a good interface with C. But the programmer may need to do
some extra work to map Janet's internal memory model may need some to that of the bound language. Janet some extra work to map Janet's internal memory model to that of the bound language. Janet
also uses `setjmp`/`longjmp` for non-local returns internally. This also uses `setjmp`/`longjmp` for non-local returns internally. This
approach is out of favor with many programmers now and doesn't always play well with other languages approach is out of favor with many programmers now and doesn't always play well with other languages
that have exceptions or stack-unwinding. that have exceptions or stack-unwinding.

View File

@ -1514,11 +1514,7 @@ void janet_loop1_impl(int has_timeout, JanetTimestamp to) {
} }
BOOL result = GetQueuedCompletionStatus(janet_vm.iocp, &num_bytes_transfered, &completionKey, &overlapped, (DWORD) waittime); BOOL result = GetQueuedCompletionStatus(janet_vm.iocp, &num_bytes_transfered, &completionKey, &overlapped, (DWORD) waittime);
if (!result) { if (result || overlapped) {
return;
}
if (overlapped) {
if (0 == completionKey) { if (0 == completionKey) {
/* Custom event */ /* Custom event */
JanetSelfPipeEvent *response = (JanetSelfPipeEvent *)(overlapped); JanetSelfPipeEvent *response = (JanetSelfPipeEvent *)(overlapped);