Welcome!

Welcome to the Official BlackBerry Support Community Forums. This is your resource to discuss support topics with your peers, and learn from each other. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Java Development

Reply
Developer
behrk2
Posts: 364
Registered: ‎11-25-2009
Accepted Solution

Question concerning event thread

[ Edited ]

Hi Everyone,

 

I need to perform a lot of Http "Get" and "Post" requests. If I am not directly interacting with the user interface (event thread), then do I need to put the class handling the http requests in its own thread?

 

Any advice would be appreciated, thanks!

 

Please use plain text.
Developer
RexDoug
Posts: 4,764
Registered: ‎07-21-2008

Re: Question concerning event thread

You should not execute any blocking operation (like an HTTP GET or POST) or any lengthy processing in the event thread. If you do, you run the risk of allowing teh event queue to overflow while you have this thread doing something else, which will cause your app to be terminated by the system.

 

You should always start a worker thread for any HTTP operation.

 

Please use plain text.
Developer
behrk2
Posts: 364
Registered: ‎11-25-2009

Re: Question concerning event thread

Thanks!

Please use plain text.