Jump to content

some kind of threading?


knight0fdragon

Recommended Posts

is there some kind of way to do simple threading??

the only thing that i can do right now is set up a timer and have a nonblocking recv, but i would like it to be blicked when the next lib comes out and have my program wait for it while it is also doing other things

Edited by knight0fdragon
Link to comment
Share on other sites

You can do small thing in Vblank interrupt (like animations). I don't think it's in the lib, but you can also use select().

I also remember someone on Gbadev has implemented a king of threading...

 

 

the one on GBADEV does not work as of yet, that i know of, and if i interrupt, it gets locked inside.

 

what is this select()? have any documentation or an example i can use?

Link to comment
Share on other sites

select() is a function that check if there is data that can be read on a socket, but it's not implemented in sgstair's lib.

But why don't using non-blocking sockets ? It isn't a problem on a non-OS system like the DS...

 

 

if i had TCP i wouldnt mind, but UDP unfortunalty drops data, so there is a less of a chance that i would get it if it were non blocked, plus im keeping networking out of the game loop because its just neater and more versitile when dealing with tons of functions

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...