Skip to content

Commit

Permalink
Background information on how Mac Glass handles invokeLater runnables
Browse files Browse the repository at this point in the history
  • Loading branch information
beldenfox committed Mar 6, 2024
1 parent 555e1a8 commit 36ae9d7
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -775,6 +775,14 @@ - (BOOL)started
return self->started;
}

// The OS may invoke a GlassRunnable either in the runMode:beforeDate: call or
// the nextEventMatchingMask call. If a runnable invoked during
// runMode:beforeDate: schedules a new runnable it will be invoked by
// nextEventMatchingMask. If a runnable invoked during nextEventMatchingMask
// schedules a new runnable it may be invoked in the same nextEventMatchingMask
// call or it may be deferred to the next loop iteration. So we can't guarantee
// that a newly scheduled runnable will be invoked in the next event loop
// cycle, it may happen in the current cycle.
+ (jobject)enterNestedEventLoopWithEnv:(JNIEnv*)env
{
jobject ret = NULL;
Expand Down

0 comments on commit 36ae9d7

Please sign in to comment.