Skip navigation
kmptx
Currently Being Moderated

Asynchronous function and flyield()

Nov 16, 2010 7:25 PM

Hi,

 

is it possible to force the Alchemy state machine to give up it's time slice every ie. 100ms in asynchronous function? Without using flyield() in C code?

 

I have only compiled crypto library (crypto.l.bc) and i'm not able to add flyield() calls to make it work in asynchronous mode.

I can put flyield() in OpenSSL source code and compile, but it's hard to find good places in such a big code.

 

please help

 
Replies
  • Currently Being Moderated
    Nov 17, 2010 10:13 AM   in reply to kmptx

    Hello kmptx,

     

    interesting case... But I don't think that there is a better way for rescheduling than flyield(). It comes down to a problem similar to "cooperative multi-tasking" versus "preemptive multitasking". The Alchemy glue code doesn't have the power to interrupt running code like a CPU can and does in modern operating systems. With flyield() the code gives up control to the Alchemy glue code.

     

    You could inject flyield() calls into LLVM BC or generated ActionScript code with a tool.

    But I don't think you can avoid using flyield() for solving your problem.

     

    Best wishes,

     

    - Bernd

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points