summaryrefslogtreecommitdiff
path: root/thread_sync.rb
Commit message (Collapse)AuthorAgeFilesLines
* thread_sync.c: Clarify and document the behavior of timeout == 0Jean Boussier2022-10-171-3/+3
| | | | | | | | | | | [Feature #18982] Instead of introducing an `exception: false` argument to have `non_block` return nil rather than raise, we can clearly document that a timeout of 0 immediately returns. The code is refactored a bit to avoid doing a time calculation in such case.
* Implement SizedQueue#push(timeout: sec)Jean Boussier2022-08-181-0/+23
| | | | | | | [Feature #18944] If both `non_block=true` and `timeout:` are supplied, ArgumentError is raised.
* Implement Queue#pop(timeout: sec)Jean Boussier2022-08-021-0/+45
[Feature #18774] As well as `SizedQueue#pop(timeout: sec)` If both `non_block=true` and `timeout:` are supplied, ArgumentError is raised.