summaryrefslogtreecommitdiff
path: root/src/Task.cc
AgeCommit message (Collapse)Author
2013-08-13Fixing rare multithreading crash.Nicolas "Pixel" Noble
-) Make sure to acquire the eventLock when possibly deleting a Task. -) Keep the lock until we're done with it.
2013-08-05Let's be a bit more explicit about the effects of not catching EAgain.Nicolas "Pixel" Noble
2013-08-05Impressive all of this worked so far. The Async event needs to be reset ↵Nicolas "Pixel" Noble
otherwise it'll always re-trigger and won't throw an EAgain, as intended.
2013-08-05Relaxing the simple context rules a bit.Nicolas "Pixel" Noble
2013-08-01When creating a new Task, steal the TLS values from its creator.Nicolas Noble
2013-08-01Slightly more useful debugging messages in operationYield.Nicolas Noble
2013-08-01I'm surprised this worked so far. The yield / EAgain mechanism was pretty ↵Nicolas Noble
much broken when using stackless operations.
2013-08-01Minor optimisation in operationYield.Nicolas Noble
2013-01-18Adding a sleep() paradigm to tasks.Nicolas 'Pixel' Noble
2012-09-01Merge commit '06674e57649d536cf19715524ee40c5ad4a9026d'Nicolas "Pixel" Noble
Conflicts: includes/LuaTask.h includes/TaskMan.h includes/Threads.h src/TaskMan.cc src/Threads.cc
2012-08-31Simplifying TLS code a bit (removing createTLS...) and making the ↵Nicolas "Pixel" Noble
PthreadsTLSManager its own global class.
2012-04-08Redifining yielding for operations a bit, making further refinements.Pixel
2012-04-08Making TaskEvents being able to be re-used for different tasks.Pixel
2012-04-08Few more quirks into the stackless mode; we don't want to allocate stacks ↵Pixel
nor create any co-routine (or fiber) if we're stackless.
2012-04-08Further refinements and protections in the stackless base.Pixel
2012-04-08Putting the bases for stackless co-routines.Pixel
Also cleaning up some code, clarifying some concepts, and adding more exception catchers.
2012-04-06Making it simplier to register a task and wait for it. Also renamed ↵Pixel
createTask to registerTask, which makes way more sense.
2012-04-06Fixing multithreading issue...Pixel
You can't signal a task from another thread, that's what the async event is for!
2012-04-03Slightly more change to the Queue system, so Debug mode doesn't freak pout.Pixel
2012-04-03Reworking a bit the way the queues are working, and thus, the way the ↵Pixel
LuaTMainTask queue works.
2012-04-01More code cleanup.Pixel
2012-04-01The TaskEvent wasn't thread-safe.Pixel
2012-03-27More code cleanupNicolas "Pixel" Noble
2011-12-11Added the ability for a task or an operation to yield. Also optimized some ↵Pixel
bits of the TaskManager.
2011-12-04Reworked some things in the architecture, mainly exceptions and asserts.Pixel
-) Removed Assert() -) Added AAssert(), IAssert(), RAssert(), TAssert() and Failure() -) Reworked all asserts in the code, and added meaningful messages to them. -) Changed the way the startup code is generated; BALAU_STARTUP is no longer necessary.
2011-11-28Fixing a debug message.Pixel
2011-11-21GeneralException() will now trace the callstack and store this, for ↵Pixel
debugging purposes.
2011-11-17Forgot to remove this; we shouldn't free the stack from the Task itself ↵Pixel
anymore: the task manager takes care of this now.
2011-11-17Cleaning some code, redesigning a bit the stack allocation problem from the ↵Pixel
task manager, and actually implementing it properly.
2011-11-17Introducing the fact we need a more efficient stack allocator, and that it's ↵Pixel
to be performed from the task manager.
2011-11-17Since tasks can be on different task managers, one has to signal them a bit ↵Pixel
differently.
2011-11-16Kind of a big revamp of the TaskMan / Task model, in order to introduce a ↵Pixel
TaskScheduler. The idea is that we need to support multiple task managers from multiple threads. So that revamp means we now should be able to support that, except the TaskScheduler needs to implement a round robin system, to distribute tasks across multiple task managers. But at least, the fundamental redesign to permit this is here.
2011-11-15Moving the static yield from Task.h to Task.cc. You don't want to throw an ↵Pixel
exception from a .h file...
2011-10-18libcoro seems to be doing really spurious things when not using the standard ↵Pixel
functions. Switching out libcoro for the native Fibers interface for Win32. Switching out the asm version for the ucontext version for Linux.
2011-10-17Adding the Async event, and tweaking the others a bit.Pixel
2011-10-17Removing the 'non-preemptible' madness before it could even be used.Pixel
2011-10-17Adding an early version of the 'engine debug' facility.Pixel
2011-10-14Fixing a few bugs.Pixel
-) The IO class needed an assignment operator, as well as the ability to NOT contain a Handle. -) The Task Manager wasn't properly starting up pending tasks that got added during startup.
2011-10-14Further tweaks to the Task class: now a Task can declare being smart, and ↵Pixel
say it's okay to get a EAgain exception, if the operation is interruptible.
2011-10-14Tweaking the Task class a bit.Pixel
-) setPreemptible now returns the previous state -) Events may now not have an owner -) Events may now have a callback (even though it still needs an owner to get into the ev_loop, for these kind of watchers...) TODO: -) think about a way to start a watcher without requireing a Task -) add a few more things in the Tasks unit tests
2011-10-14The tasks can now set themselves to be non-preemptible. Also implemented a ↵Pixel
mechanism to re-arm an event.
2011-10-10Adding the basic "Handle" structure, and adding an early version of Input.Pixel
Renamed suspend() to yield(). Fixed a couple of bugs, and reorganized slightly some code.
2011-10-09Starting to integrate libev; timer event works.Pixel
2011-10-09More work on the Task manager.Pixel
Now "Main" is a Task, among the most important changes. Introduced the notion of Events, and managed a coherent task switch. Also, renamed a lot of the variables to have a more coherent naming scheme.
2011-10-07More work in the Task manager.Pixel
Also fixing a few bugs linked with the printer and TLS. Removed flto from compilation flags: this actually creates bad code (!)
2011-10-07Preliminary work for the Task manager.Pixel
Added libcoro submodule. Also refactored some pieces of code.