Граф коммитов

3 Коммитов

Автор SHA1 Сообщение Дата
Jean Boussier 60defe0a68 thread_sync.c: Clarify and document the behavior of timeout == 0
[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.
2022-10-17 16:56:00 +02:00
Jean Boussier fe61cad749 Implement SizedQueue#push(timeout: sec)
[Feature #18944]

If both `non_block=true` and `timeout:` are supplied, ArgumentError
is raised.
2022-08-18 10:07:37 +02:00
Jean Boussier e3aabe93aa Implement Queue#pop(timeout: sec)
[Feature #18774]

As well as `SizedQueue#pop(timeout: sec)`

If both `non_block=true` and `timeout:` are supplied, ArgumentError
is raised.
2022-08-02 11:04:28 +02:00