Skip to content

Commit

Permalink
Merge pull request #1485 from actonlang/http
Browse files Browse the repository at this point in the history
Add http module
  • Loading branch information
plajjan authored Sep 11, 2023
2 parents 8ca002b + 18cca21 commit 260a1c7
Show file tree
Hide file tree
Showing 4 changed files with 636 additions and 1 deletion.
4 changes: 4 additions & 0 deletions base/rts/rts.c
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,9 @@ struct $ConstContG_class $ConstContG_methods = {
// else immediately return false.
bool ADD_waiting($Actor a, B_Msg m) {
bool did_add = false;

assert(m != NULL);

spinlock_lock(&m->$wait_lock);
if (!FROZEN(m)) {
a->$next = m->$waiting;
Expand Down Expand Up @@ -1588,6 +1591,7 @@ void wt_work_cb(uv_check_t *ev) {
}
m->$cont = r.cont;
B_Msg x = (B_Msg)r.value;
assert(x != NULL);
if (ADD_waiting(current, x)) { // x->cont is a proper $Cont: x is still being processed so current was added to x->waiting
rtsd_printf("## AWAIT actor %ld : %s", current->$globkey, current->$class->$GCINFO);
current->$waitsfor = x;
Expand Down
Loading

0 comments on commit 260a1c7

Please sign in to comment.