haskell / win32

Haskell support for the Win32 API
http://hackage.haskell.org/package/Win32
Other
98 stars 62 forks source link

Add Semaphore support #214

Closed sheaf closed 2 years ago

sheaf commented 2 years ago

Description

This PR adds support for Windows Semaphores. I mostly followed the information on this page and its linked pages.

This is my first time contributing to this library, so there might be some obvious oversights. Thanks.

Motivation and Context

This adds a counterpart to the posix semaphore functionality offered by the unix package, which I am interested in using in ghc to improve contention with package-level parallelism.

Types of changes

Checklist:

Mistuke commented 2 years ago

Awesome! This is looking great, let me know whenever you're ready for a review! Thanks!

sheaf commented 2 years ago

Awesome! This is looking great, let me know whenever you're ready for a review! Thanks!

Thanks, I think this is ready for review, now that I've got a test checking the functionality.

Mistuke commented 2 years ago

Thanks this looks perfect.