aboutsummaryrefslogtreecommitdiff
path: root/tests/cancel.lua (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Give a name to all lanes in the testsBenoit Germain2025-03-141-5/+5
|
* Fix/disable some unit tests against LuaJIT until the failure reason is ↵Benoit Germain2025-03-101-1/+2
| | | | | | | | | discovered * cancel.lua fails when using lanes.coro * coro/basics.lua fails because an error message is different * coro/error_handling fails for an unknown reason * a lanes.finally test crashes inside lua_close
* Migrated unit tests to Catch2 v3.7.1Benoit Germain2024-12-201-5/+5
|
* Internal rework of an enum bad practice usageBenoit Germain2024-12-031-56/+56
|
* New method linda:restrict()Benoit Germain2024-12-031-2/+9
|
* Internal refactorization to properly handle lua_resume idiosyncrasiesBenoit Germain2024-07-291-1/+1
|
* Fix finalizers in coroutine lanesBenoit Germain2024-07-041-4/+7
|
* Renamed set_debug_threadname → lane_threadname (can also read the current ↵Benoit Germain2024-07-031-1/+1
| | | | name now)
* Change linda:limit()Benoit Germain2024-06-261-2/+2
| | | | | | * read the current limit of a key if no limit is provided * "unlimited" is to be used to clear the limit * fix linda:set() not ignoring the limit
* linda :get(), :set(), :limit() return value changesBenoit Germain2024-06-121-3/+4
|
* Fixes and improvements to lane:join()Benoit Germain2024-06-111-0/+1
| | | | | * fix: returns nil,cancel_error when lane was cancelled * improvement: enforce non-nil first return value of lane body when using lane:join() to obtain the results
* Moved lanes.sleep implementation to the C-sideBenoit Germain2024-06-031-2/+9
|
* Some API changesBenoit Germain2024-05-311-9/+14
| | | | | | * lanes.timers() can return nil, cancel_error if interrupted * linda:receive() always return a k,v, where k is nil when v is "timeout" or cancel_error * lanes.sleep returns nil, "timeout" during normal operations
* linda:limit uses nil instead of -1 to unblockBenoit Germain2024-05-201-5/+5
|
* some dead code elimination and other triflesBenoit Germain2024-04-161-6/+16
|
* C++ migration: use std::jthread, std::condition_variable, std::chrono.Benoit Germain2024-04-081-15/+5
| | | | | | | | win32 pthread support is gone new setting configure.shutdown_mode for cancellation of free-running threads at shutdown. no more hard thread termination! If a thread doesn't cooperate, an error is raised. lane.status "killed" is gone lane:cancel can't force-kill.
* tweak cancel.lua to enable individual tests. fix "hook" test for LuaJIT ↵Benoit Germain2024-04-041-10/+24
| | | | (need "line" hook instead of "count" to work as expected)
* tweak cancel.lua test file to be able to cherry-pick tests with command line ↵Benoit Germain2024-03-281-88/+103
| | | | arguments
* Lane cancellation reworkBenoit Germain2019-04-261-45/+117
| | | | | opt.cancelstep is gone, hook is installed by lane:cancel() if requested lane:cancel() rework (see doc)
* more fixes/tweaks about cancelled lindasBenoit Germain2014-02-131-0/+30
| | | | | | | | | | * bumped version to 3.8.5 * linda:limit() returns lanes.cancel_error on a limited linda * lanes.genlock() and lanes.genatomic() support cancelled lindas by returning lanes.cancel_error whenever appropriate * fixed a possible Lua stack overflow when calling linda:dump() * fixed cases where linda:send() and linda:receive() would not return lanes.cancel_error when they should
* new API linda:cancel("read"|"write"|"both"|"none")Benoit Germain2014-02-101-2/+17
| | | | | | | * bumped version to 3.8.4 * all linda operations return lanes.cancel_error on a cancelled linda * raised an internal string length so that longer linda names are fully output before truncation applies when doing tostring( linda)
* Cancellation improvements and some fixesBenoit Germain2014-01-161-0/+93
* bumped version to 3.7.8 * lane:cancel() now accepts a boolean second argument when soft cancelling (negative timeout) to wake the thread if necessary * if a blocked linda send() or receive() call is interrupted by a cancellation request, it returns CANCEL_ERROR so that this case can be differentiated from a simple timeout * fixed WIN32 THREAD_CREATE() wrong _beginthreadex() error detection * fatal WIN32 threading errors retrieve and output the error description string with FormatMessage() * fixed missing lanes.set_singlethreaded * fixed perftest.lua * added test/cancel.lua