Jump to content
  • Advertisement
Sign in to follow this  
ASBai

Do we need to create a new context for doing a callback?

This topic is 594 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

According to this article: http://www.angelcode.com/angelscript/sdk/docs/manual/doc_callbacks.html

If we need to callback a script function from the native app when the script is running, we must create a new context (I know I can reuse them by maintain a context pool) to do the callback?

Can I launch the callback just within the current context?

 

For example:

1.Native App create a context named "ctx".

2.Native App then Prepare() and Execute() a script function "void script_main(void)" on "ctx".

3.The script in "script_main" make a call to a native function "native_api(my_callback)".

4.The native function "native_api" want to callback the script funcation "my_callback" also on "ctx" (not on another context). Is it possible?

Edited by ASBai

Share this post


Link to post
Share on other sites
Advertisement

Got it, I remembered seeing this technique in a chapter talking about concurrency.

 

Thanks :)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!