13
45
Fork
You've already forked fibers
10

Interrupt thread termination is racy #159

Open
opened 2025年11月11日 16:06:51 +01:00 by civodul · 0 comments

The trick implemented in d20543b98a (see #137) seems to be racy. For instance, the following code eventually hangs in join-thread (in wait-condition-variable, called by join-thread) as of a2133d0a40:

./env guile -c '(use-modules (fibers)) (while #t (run-fibers (const #t)) (display "."))'

I think that’s because we cannot be sure the signal is sent at all (due to (when interrupt-thread ...) and also that the async queued by cancel-thread gets to run before (re)entering clock-nanosleep.

The trick implemented in d20543b98a341abc534c6449461ea85af973e7aa (see #137) seems to be racy. For instance, the following code eventually hangs in `join-thread` (in `wait-condition-variable`, called by `join-thread`) as of a2133d0a402836088a1f2df9dc88438eeeaabfc8: ``` ./env guile -c '(use-modules (fibers)) (while #t (run-fibers (const #t)) (display "."))' ``` I think that’s because we cannot be sure the signal is sent at all (due to `(when interrupt-thread ...)` and also that the async queued by `cancel-thread` gets to run before (re)entering `clock-nanosleep`.
Sign in to join this conversation.
No Branch/Tag specified
main
revert-110-wip-cancel-timer-operations
fdless-draft
pr-60-adjust
more-operations
timer-wheel
cross
nice-dynamic-wind-experiment
v1.4.3
v1.4.2
v1.4.1
v1.4.0
v1.3.1
v1.3.0
v1.2.0
v1.1.1
v1.1.0
v1.0.0
v0.5.0
v0.4.0
v0.3.0
v0.2.0
v0.1.0
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
guile/fibers#159
Reference in a new issue
guile/fibers
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?