diff options
author | Dan Gudmundsson <[email protected]> | 2017-05-29 08:52:20 +0200 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2017-05-29 08:52:20 +0200 |
commit | 90069adbd06b9e429d1d77ebdab62ad78904ff0e (patch) | |
tree | ec90d8b9372642f37ba57f09035de75f0a18c489 | |
parent | 0ab4a336d0935c47b26cceb202ab63344c03b8a2 (diff) | |
parent | 3b4b6cdeaec93f498d8586bffe9061a721d4088d (diff) | |
download | otp-90069adbd06b9e429d1d77ebdab62ad78904ff0e.tar.gz otp-90069adbd06b9e429d1d77ebdab62ad78904ff0e.tar.bz2 otp-90069adbd06b9e429d1d77ebdab62ad78904ff0e.zip |
Merge branch 'dgud/wx/tune-break-loop'
* dgud/wx/tune-break-loop:
wx: Tune when to break command loop in driver
-rw-r--r-- | lib/wx/c_src/wxe_impl.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/wx/c_src/wxe_impl.cpp b/lib/wx/c_src/wxe_impl.cpp index 7817e7fa8a..1510866f09 100644 --- a/lib/wx/c_src/wxe_impl.cpp +++ b/lib/wx/c_src/wxe_impl.cpp @@ -267,7 +267,7 @@ int WxeApp::dispatch_cmds() return more; } -#define BREAK_BATCH 200 +#define BREAK_BATCH 10000 int WxeApp::dispatch(wxeFifo * batch) { @@ -284,7 +284,7 @@ int WxeApp::dispatch(wxeFifo * batch) if(blevel>0) { blevel--; if(blevel==0) - wait += BREAK_BATCH*100; + wait += BREAK_BATCH/4; } break; case WXE_BATCH_BEGIN: @@ -317,7 +317,7 @@ int WxeApp::dispatch(wxeFifo * batch) erl_drv_mutex_lock(wxe_batch_locker_m); batch->Cleanup(); } - if(blevel <= 0 || wait > BREAK_BATCH) { + if(blevel <= 0 || wait >= BREAK_BATCH) { erl_drv_mutex_unlock(wxe_batch_locker_m); if(blevel > 0) { return 1; // We are still in a batch but we can let wx check for events |