Open Sniper199999 opened 2 years ago
C++ code of the queue uses POSIX interprocess synchronization primitives, therefore it will only work on a POSIX system. I think you can make it work in a MinGW/Cygwin environment on Windows, or in Windows Subsystem for Linux (WSL). But not in a vanilla Windows environment.
I believe Windows has similar primitives to pthread mutexes as a part of WinAPI (not an expert), so most likely Windows support can be added using some preprocessor conditioned branches. It is a very welcome contribution! :)
Requirements section mentioned supported OSes, perhaps should add an explicit note that Windows is not currently supported. https://github.com/alex-petrenko/faster-fifo#requirements
Actually Windows implementation can be easier than I thought: https://stackoverflow.com/questions/6672539/linux-pthread-portability-on-windows http://sourceware.org/pthreads-win32/ - looks promising. I never actually looked closely due to lack of time.
Also found this: https://github.com/marklakata/mqueue-w32
That is good to hear that it could possibly be implemented on Windows. For now, I have my code working without using queue in Processes, but I still think the queue implementation will be faster.
I looked through the links, and a lot of stuff is new to me. Tell me if I am wrong: Windows is not POSIX sysystem, in order to get POSIX pthreads working on windows I need MinGW64 which supports gcc compiler. Then I need to install pthreads-win32 or https://sourceforge.net/projects/pthreads4w/ in MinGW for getting the POSIX compatibilities in Windows. Then it should work just fine?
@Sniper199999 I know very little about IPC in Windows. I am not at all confident that pthread-win32 has full support for all POSIX features, such as inter-process mutexes (in fact, looks like it doesn't). I am confident enough that in principle Windows implementation is possible, although it might require using some Win32 API.
At this time Windows implementation is beyond both my expertise and capacity, hope you understand :) But I love to see interest and attention to this repository. If you'd be willing to work on Windows support, I'd be glad to help!
If you're looking at a simple plug-and-play solution that would make your Windows app faster, this is probably not it. Moreover, I'd generally look for performance outside of Python world (unless you absolutely have to use Python). I also think that cross-platform support goes a super long way towards popularity of software and I can't encourage it enough if you'd like to work on that! :)
I tried to install this package on my Windows 10 machine. Got this following error:
Just noticed that Linux and Mac versions are supported, but did not see any mentions of Windows not being supported.