diff options
author | Thomas Grill <xovo@users.sourceforge.net> | 2004-11-09 03:31:34 +0000 |
---|---|---|
committer | Thomas Grill <xovo@users.sourceforge.net> | 2004-11-09 03:31:34 +0000 |
commit | 3384ea6c30532381dbe30d540bb657a7463e28dc (patch) | |
tree | 2167bc2d0a4c93c1ecd599f2bc354aebf4bca3b8 /externals/grill/flext/source/flqueue.cpp | |
parent | c001b12ff53998fac91e9d5915a7f760579770fc (diff) |
fixed a thread sensitive spot
make some adaptations for 0.38 compatibility
made queue length longer and added overflow checks
svn path=/trunk/; revision=2248
Diffstat (limited to 'externals/grill/flext/source/flqueue.cpp')
-rwxr-xr-x | externals/grill/flext/source/flqueue.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/externals/grill/flext/source/flqueue.cpp b/externals/grill/flext/source/flqueue.cpp index 37769c17..41b201d7 100755 --- a/externals/grill/flext/source/flqueue.cpp +++ b/externals/grill/flext/source/flqueue.cpp @@ -26,8 +26,8 @@ flext::thrid_t flext::thrmsgid = 0; #endif -#define QUEUE_LENGTH 512 -#define QUEUE_ATOMS 1024 +#define QUEUE_LENGTH 2048 +#define QUEUE_ATOMS 8192 class qmsg { @@ -197,7 +197,8 @@ static void QWork(bool syslock) if(syslock) sys_lock(); #endif - for(int i = 0; i < qc; ++i) { + // once more, because flushing in destructors could have reduced the count + for(qc = queue.Count(); qc--; ) { queue.Head().Send(); queue.Pop(); } // inner loop |