execution time of scheduled action ion poolfiber

Options
BesoC
BesoC ✭✭
edited July 2013 in Photon Server
HI

My question is about differences in functionality between PoolFiber.Schedule() and Timer.AddAction(). As I understand actions scheduled in poolfiber will execute in that poolfiber, unlike Timer-scheduled actions. What will happen if , at scheduled time, poolfiber is busy executing some other action? for instance:

1. let's say some action is scheduled in poolfiber to execute at 12:00
2. when 12:00 comes, the poolfiber is busy with some operation that will last until 12:01

scheduled action will be started at 12:01?

Another example:
1. Again, some action is scheduled in poolfiber at 12:00
2. at 12:00, poolfiber has several actions enqueued in it

what will happen to the scheduled action? will it start right after the first queued action is complete (e.g. will be inserted in queue after the current executing action)? will it wait till all queued actions are complete (e.g. will be added to the end of the queue)?

Comments

  • chvetsov
    Options
    Hi, BesoC
    you can find implementation details of Fibers here
    https://code.google.com/p/retlang/

    In short, when timer expires it just puts new task to fiber queue. This taks will be last in queue, and will be executed according order of tasks in queue.