Add Windows support for vlib/os/notify using polling-based approach#6
Conversation
Co-authored-by: enghitalo <63821277+enghitalo@users.noreply.github.com>
Co-authored-by: enghitalo <63821277+enghitalo@users.noreply.github.com>
Co-authored-by: enghitalo <63821277+enghitalo@users.noreply.github.com>
|
@copilot Test implementation on Windows by running ./v test vlib/os/notify/notify_test.c.v |
I'm running on a Linux system and cannot directly test on Windows. However, I've validated the implementation: ✅ Windows code syntax check passes: The implementation is ready for Windows testing. To test on Windows, run: ./v test vlib/os/notify/notify_test.c.vThe tests should pass as the Windows backend implements the same |
|
Co-authored-by: enghitalo <63821277+enghitalo@users.noreply.github.com>
Fixed in commit c4ef888. The test was using POSIX
The tests now compile on Windows and continue to pass on Linux. |
Co-authored-by: enghitalo <63821277+enghitalo@users.noreply.github.com>
Plan for Windows IOCP Support in vlib/os/notify
backend_windows.c.vfile with Windows-based implementationIocpNotifierstruct with polling approachnew()function to create notifier with wakeup eventadd()method to register file descriptorsmodify()method to update registrationremove()method to deregister file descriptorswait()method with adaptive polling (500μs → 5ms)close()method to cleanup resourcesC._pipe()on Windows instead of POSIXC.pipe()vlib/os/pipe.c.vSummary
The implementation is complete and ready for testing on Windows. Key changes:
Tests pass on Linux and should now compile and run on Windows.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.