Skip to content

Commit

Permalink
lin_xs: set promiseJobsFlag in fxQueuePromiseJobs
Browse files Browse the repository at this point in the history
This lets the lin_xs_cli platform run the promise queue to quiescence,
a technique taken from xsl.
  • Loading branch information
dckc committed Dec 27, 2019
1 parent 2f7f8c2 commit dd39fd6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions xs/platforms/lin_xs.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ void fxDeleteMachinePlatform(txMachine* the)

void fxQueuePromiseJobs(txMachine* the)
{
the->promiseJobsFlag = 1;
GSource* idle_source = g_idle_source_new();
g_source_set_callback(idle_source, fxQueuePromiseJobsCallback, the, NULL);
g_source_set_priority(idle_source, G_PRIORITY_DEFAULT);
Expand Down
1 change: 1 addition & 0 deletions xs/platforms/lin_xs.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ extern void fxQueueWorkerJob(void* machine, void* job);
void* waiterCondition; \
void* waiterData; \
void* waiterLink; \
gboolean promiseJobsFlag; \
GMainContext* workerContext; \
GMutex workerMutex; \
txWorkerJob* workerQueue;
Expand Down

0 comments on commit dd39fd6

Please sign in to comment.