Comments (4)
Good catch! I think this should be considered a bug and should be fixed.
from omnithreadlibrary.
BTW, your approach looks a bit weird to me. Why do you call the Execute if you then immediately check if you can run it at all? Can't you just call Run without a parameter and then do 'task.Invoke(Execute)' when you actually need it?
from omnithreadlibrary.
I don't want to make the demo too complex ;)
Just add the IOmniThreadPool and set MaxExecuting := 1
. Followed by:
CreateTask(TMyOmniWorker.Create(True)).MonitorWith(FOmniEM).
Schedule(FThreadPool).Invoke(@TMyOmniWorker.Execute)
Same result.
Now, the tasks are inside the queue and at the time a specific task is able to run (because all previous tasks have been finished), the time has passed and the task caller is maybe gone and this specific task is unnecessary to be done.
http://geskill.bplaced.net/hp/other/OmniWorkerTestwithMonitorandThreadPool.zip
PS: Now even more internal calls have to be redirected from ReceiveWait ^_^
from omnithreadlibrary.
OK, that is a sensible argument.
from omnithreadlibrary.
Related Issues (20)
- Error 1400 HOT 1
- Alexandria HOT 1
- Designtime Release Config incorrect LIB suffix HOT 1
- ForEach not working for objects?
- Madexcept and OTL HOT 2
- Compilation of Release 3.07.9 fails with D2010 HOT 1
- Parallel.For() does not support Int64 (but Delphi's TParallel.For() does)
- Installation on Delphi 11 (GetIt and GroupProj) HOT 2
- PostMessage related Quota error during peak machine latencies
- Bad address when casting FWaitHandle object to TWaiter
- Parallel.ForEach<> inside Parallel.Future<> seems to leak threads HOT 1
- Parallel.ForEach going CRAZY on memory HOT 11
- Dont Install on Alexandria
- Add Delphi 12 support
- Release 3.07.10 does not compile on Delphi older than 10.3 Rio HOT 1
- 3.07.10 please fix hints
- Invalid Delphinus.install.json file
- Out of memory
- Enhancement : Enqueue a message with priority in the TOmniMessageQueue
- Memory Leak When Terminate(0) a Runing Thread
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from omnithreadlibrary.