32 Commits

Author SHA1 Message Date
Charles-Francois Natali
14838d1f6f Make is_lock_free constexpr.
This makes it possible to use it in `static_assert`, which is better
than a runtime error.
2021-11-24 13:50:39 +00:00
Cameron
b9b4aa8350 Work around template argument deduction bug in GCC 9.2.0 (issue #218) 2020-09-11 16:11:29 -04:00
Cameron
4cc3bee07b Fixed accidental reference being taken on new static const variable with g++ (issue #208) 2020-06-26 08:42:52 -04:00
Cameron
790db30df5 Added MAX_SEMA_SPINS to traits to control semaphore spin-waiting (see issue #205) 2020-06-24 15:05:32 -04:00
Cameron
7912b95d04 Updated license comments to make extra-clear that the code is dual-licensed under the Boost terms (issue #207) 2020-06-24 14:43:30 -04:00
Cameron
207f91271f Merge branch 'split_out_semaphores2' of https://github.com/zerodefect/concurrentqueue into zerodefect-split_out_semaphores2 2019-12-27 22:26:06 -05:00
Cameron
4bcc86ece3 Fixed semaphore error handling (see issue #173) 2019-12-27 17:03:45 -05:00
Cameron
02f36545c5 Allow likely/unlikely macros to co-exist without causing compile errors (issue #108) 2018-03-01 16:28:59 -05:00
Dmitry Petrashko
d40e4e754d Fix infinite loop in blockingconcurrentqueue on OS X
Current code assumes that any value other than KERN_OPERATION_TIMED_OUT i
ndicates signal from another thread. 
This assumption is false, as other return values include interrupt,
e.g. from debugger.

This leads to infinite loop here: 
https://github.com/cameron314/concurrentqueue/blob/master/blockingconcurrentqueue.h#L817
2018-02-01 20:52:51 -08:00
zerodefect
071bd1351d Merged master. 2018-01-14 23:11:30 +00:00
Cameron
735179e91e Silenced warning with cast on OS X (following identical pull request from readerwriterqueue#56) 2017-11-09 17:40:56 -05:00
zerodefect
5bf4a026f8 Several changes made as per code-review. 2017-11-01 20:34:31 +00:00
zerodefect
5cfe6118c0 moved semaphore into a separate header file. 2017-11-01 20:34:11 +00:00
Cameron
2149d48fb7 Fixed issue where nsec could exceed its maximum value by one 2017-09-27 12:26:22 -04:00
Cameron
3df464c32c Don't use 3-argument form of compare_exchange since it's broken on some Android libstdc++ implementations (issue #68) 2017-01-13 12:22:58 -05:00
Cameron
c227e283a9 Added missing header for clock_gettime 2016-06-15 16:41:28 +00:00
cameron314
abbbc9e4d1 Fixed memory barriers not complying to C++11 model (issue #51) 2016-05-25 07:32:06 -04:00
Cameron
85775ecc4a Added missing memory barrier on CAS failure 2016-05-11 13:36:41 -04:00
Cameron
1124c1a7af Replaced implicit conversions with explicit conversions 2016-05-11 13:27:16 -04:00
Cameron
f52be57f2f Added unit test for timed waits (all seems well so far!) -- see issues #22 and #38 2016-05-10 23:12:52 -04:00
Cameron
faa5b28148 Added missing header and std::chrono::duration overloads. Relates to issue #22 2016-05-04 13:16:20 -04:00
Cameron
3d216afaf9 Added OS X timed wait support (untested). See pull request #38 2016-05-02 01:13:57 -04:00
Cameron
08ad767bf6 First pass at support for timeouts in blocking queue. Windows and Linux only so far. Untested. See issues #22, #38 2016-05-02 01:12:36 -04:00
mojoBrendan
de372d35ef Preliminary merg of pull request #22 from https://github.com/mojoBrendan/concurrentqueue.git: add timeout to queue 2016-05-02 01:12:35 -04:00
Cameron
a951473283 Allow malloc() and free() macros to be defined without breaking code (issue #27) 2015-09-11 14:25:22 -04:00
Cameron
259efbca9f Fixed throw in code even when exceptions are disabled (issue #20) 2015-05-25 15:12:43 -04:00
jeremy
ea6b8c0bb0 Added MOODYCAMEL_DELETED_FUNCTION macro (compiling under VS2012 now works) 2015-05-20 23:31:07 +02:00
cameron314
84e520d679 Added explanation to README of how to set the initial size of the queue correctly, plus an alternate constructor that does this for you, and fixed offsetof warning under GCC 2015-04-23 23:52:53 -04:00
Cameron
18728dda5c Got blocking queue compiling under VS2013 2015-04-10 23:03:02 -04:00
cameron314
db68eeafe4 Fixed spin waiting never actually giving up and blocking 2015-04-09 09:03:20 -04:00
cameron314
15249a415c Removed unecessary #define guard 2015-04-09 08:46:10 -04:00
cameron314
d3735b5b7a Added blocking version of queue 2015-04-08 20:09:19 -04:00