# Interfacing with the Asynchronous Programming Model

**URL:** <https://www.ruby-forum.com/t/interfacing-with-the-asynchronous-programming-model/201362>\
**Category:** IronRuby\
**Created:** [January 6, 2011, 2:34am UTC](https://www.ruby-forum.com/t/interfacing-with-the-asynchronous-programming-model/201362 "2011-01-06T02:34:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [January 6, 2011, 2:34am UTC](https://www.ruby-forum.com/t/interfacing-with-the-asynchronous-programming-model/201362/1 "2011-01-06T02:34:44Z")

</div>

I am thinking about using about using Ruby in conjunction with the APM.  
I want to transition from a C# program written using the  
BeginXXX/EndXXX paradigm to execute the asynchronous part in a ruby  
script host.  
I would need to be able to run many threads over the same script, to  
have it return when waiting rather than hold onto the thread, and to  
be able to resume on a different thread than it had been running  
originally.  
Note: I do not want to use the Iron Ruby thread, which maps to a .NET  
thread, but to use the ability to suspend and later resume a  
computation to execute many kinds of activities on a single thread, or  
on a set of threads in the thread pool.  
Is this going to be possible, given the limitations of Iron Ruby?  
Is is bad idea for some other reason?
