Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
pike
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pikelang
pike
Commits
a3dfc367
Commit
a3dfc367
authored
3 years ago
by
Henrik (Grubba) Grubbström
Browse files
Options
Downloads
Patches
Plain Diff
Concurrent: Stricter handling of zero.
parent
2bc548c9
Branches
Branches containing commit
Tags
rxnpatch/2022-03-01T144018
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/modules/Concurrent.pmod
+6
-5
6 additions, 5 deletions
lib/modules/Concurrent.pmod
with
6 additions
and
5 deletions
lib/modules/Concurrent.pmod
+
6
−
5
View file @
a3dfc367
...
...
@@ -233,7 +233,7 @@ class Future
//! @[on_failure()], @[query_success_callbacks()]
this_program on_success(function(mixed, __unknown__ ... : void) cb, mixed ... extra)
{
Thread.MutexKey key = mux->lock();
object(
Thread.MutexKey
)|zero
key = mux->lock();
switch (state) {
case STATE_FULFILLED:
key = 0;
...
...
@@ -275,9 +275,10 @@ class Future
//!
//! @seealso
//! @[on_success()], @[query_failure_callbacks()]
this_program on_failure(function(mixed, __unknown__ ... : void) cb, mixed ... extra)
this_program on_failure(function(mixed, __unknown__ ... : void) cb,
mixed ... extra)
{
Thread.MutexKey key = mux->lock();
object(
Thread.MutexKey
)|zero
key = mux->lock();
switch (state) {
case STATE_REJECTED:
state = STATE_REJECTION_REPORTED;
...
...
@@ -833,7 +834,7 @@ class Promise
protected this_program finalise(State newstate, mixed value, int try)
{
Thread.MutexKey key = mux->lock();
object(
Thread.MutexKey
)|zero
key = mux->lock();
if (state <= STATE_PENDING)
{
state = newstate;
...
...
@@ -855,7 +856,7 @@ class Promise
state = STATE_REJECTION_REPORTED;
}
}
failure_cbs = success_cbs =
0
; // Free memory and references
failure_cbs = success_cbs =
({})
; // Free memory and references
}
else
{
...
...
This diff is collapsed.
Click to expand it.
Henrik (Grubba) Grubbström
@grubba
mentioned in commit
c9048172
·
1 year ago
mentioned in commit
c9048172
mentioned in commit c90481722087341af056e9f83635b3ff1edf6b88
Toggle commit list
Henrik (Grubba) Grubbström
@grubba
mentioned in commit
6ffbc22d
·
1 year ago
mentioned in commit
6ffbc22d
mentioned in commit 6ffbc22dafa15388d85a6f6ebca39a03af01195d
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment