TheGameCreators / AGK-Studio

3 stars 1 forks source link

feature request: asynchronous thread support #190

Open PurpleSquirrelJohn opened 5 years ago

PurpleSquirrelJohn commented 5 years ago

Followup from an old question in the forums about the classic version:

https://forum.thegamecreators.com/thread/223400

It would be very useful (to me anyway) to have support for asynchronous threading.

Specifically, the board game program I've written uses a Negamax algorithm to determine the next move. The process takes from between 0.02s to 12s to complete, depending on depth, on a typical Android device. Without putting the function into a backgrounded thread, the program "locks up" from the point of view of the end user.

The background thread does not need access to any UI elements or any kind of shared memory. I just need a copy of the parameters passed into it and getting the returned result back when the process finishes. Having the ability to kill the thread would be a bonus.

I would imagine anyone writing a non-trivial turn-based game on the platform would need this: Chess, Backgammon, Checkers, etc.

plemsoft commented 5 years ago

@PurpleSquirrelJohn Thanks for suggestion this.

Indeed would be useful , not sure if it would be possible , it would have to be "pure code" no api calls , but ... thinks this is one for our guru Paul :)

Rick-Nasher commented 5 years ago

+1