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.

inside custom component

Java Development

Reply
Developer
Developer
Posts: 1,123
Registered: ‎02-10-2009
My Device: 8130 / 8350 / 9530 / 9550 / 9850 / PlayBook
Accepted Solution

BBM SDK Thread Safe??

Does anyone know if the sent/recieved messages are thread safe, or do we need to do our own synchronizing to make sure a new message doesn't process before the old one completes?

BlackBerry Development Advisor
Posts: 14,971
Registered: ‎07-09-2008
My Device: BlackBerry Passport

Re: BBM SDK Thread Safe??

It is not thread safe. If you are using two threads in your application processing messages simultaneously, you'll need to take care of synchronization. If you only have one thread, then it should be fine.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Developer
Developer
Posts: 1,123
Registered: ‎02-10-2009
My Device: 8130 / 8350 / 9530 / 9550 / 9850 / PlayBook

Re: BBM SDK Thread Safe??

I only have one background thread started on startup the process the messages for my application, I was more worried about how my listener is being called by the BBM platform. Does it call my listener method in a FIFO order or does it make each call in a separate thread?
BlackBerry Development Advisor
Posts: 14,971
Registered: ‎07-09-2008
My Device: BlackBerry Passport

Re: BBM SDK Thread Safe??

In that case messages would be delivered in the order they are received.  Each call is on the same thread.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker