Commit graph

11 commits

Author SHA1 Message Date
Samuel Williams
5d1702e01a
Enumerator should use a non-blocking fiber, change rb_fiber_new to be non-blocking by default. (#10481) 2024-04-08 00:49:01 +12:00
Samuel Williams
b473d304d4
Revert "Enumerator should use a non-blocking fiber. (#10478)" (#10480)
This reverts commit dfa0897de8.

This commit accidentally included some change in `parse.h`. Reverting
and re-applying the relevant changes.
2024-04-07 10:20:22 +00:00
Samuel Williams
dfa0897de8
Enumerator should use a non-blocking fiber. (#10478) 2024-04-07 19:18:09 +12:00
Samuel Williams
ea8a7287e2
Add support for sockaddr_un on Windows. (#6513)
* Windows: Fix warning about undefined if_indextoname()

* Windows: Fix UNIXSocket on MINGW and make .pair more reliable

* Windows: Use nonblock=true for read tests with scheduler

* Windows: Move socket detection from File.socket? to File.stat

Add S_IFSOCK to Windows and interpret reparse points accordingly.
Enable tests that work now.

* Windows: Use wide-char functions to UNIXSocket

This fixes behaviour with non-ASCII characters.
It also fixes deletion of temporary UNIXSocket.pair files.

* Windows: Add UNIXSocket tests for specifics of Windows impl.

* Windows: fix VC build due to missing _snwprintf

Avoid usage of _snwprintf, since it fails linking ruby.dll like so:

  linking shared-library x64-vcruntime140-ruby320.dll
  x64-vcruntime140-ruby320.def : error LNK2001: unresolved external symbol snwprintf
  x64-vcruntime140-ruby320.def : error LNK2001: unresolved external symbol vsnwprintf_l

whereas linking miniruby.exe succeeds.

This patch uses snprintf on the UTF-8 string instead.

Also remove branch GetWindowsDirectoryW, since it doesn't work.

* Windows: Fix dangling symlink test failures

Co-authored-by: Lars Kanis <kanis@comcard.de>
2022-11-17 14:50:25 -08:00
Hiroshi SHIBATA
f95039af75
Use omit instead of skip without the default gems tests 2022-01-11 21:17:59 +09:00
Samuel Williams
a08ee8330d Rename to Fiber#set_scheduler. 2020-11-07 23:39:50 +13:00
Samuel Williams
132453fa52 Rename Fiber{} to Fiber.schedule{}. 2020-09-14 16:44:09 +12:00
Samuel Williams
e6e9cef06e Improve consistency of tests. 2020-07-20 13:20:58 +12:00
Nobuyoshi Nakada
79d06483a8
Close sockets if blocking to fix leaked fds 2020-07-15 16:36:57 +09:00
Hiroshi SHIBATA
d48c92aa04
Rename TestScheduler* to TestFiber for convention of the test directory 2020-05-23 16:44:57 +09:00
Samuel Williams
6fa8455ebb Move test/scheduler -> test/fiber [Bug #16892][ruby-core:98366]. 2020-05-15 13:26:23 +12:00
Renamed from test/scheduler/test_enumerator.rb (Browse further)