avajs / cooperate

Plugin to enable cooperation between AVA test files
7 stars 5 forks source link

Document what a lock is #4

Closed jakobrosenberg closed 3 years ago

jakobrosenberg commented 3 years ago

This is all the documentation I could find on locks:

Locks You can create a lock within a context:

https://github.com/avajs/cooperate

Available plugins @ava/get-port works like get-port, but ensures the port is locked across all test files. @ava/cooperate implements locking and value reservation functionality.

https://github.com/avajs/ava/blob/master/docs/recipes/shared-workers.md

I'm not sure what it does or what I need it for.

novemberborn commented 3 years ago

I'm not sure what it does or what I need it for.

You might not! Which is fine.

This is quite a low-level library, I think folks may only know to use it when they know to use it.

Would linking to the Wikipedia article on locks help? https://en.wikipedia.org/wiki/Lock_(computer_science)

jakobrosenberg commented 3 years ago

Thanks @novemberborn! That's not at all what I thought it was 😂