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

Posts: 191
Registered: ‎04-02-2013
My Device: BlackBerry Bold 9900
My Carrier: developer
Accepted Solution

How to release event lock?


I have used the EventLock in my application

synchronized (UiApplication.getEventLock())



Now i want to know how to release it?

Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: How to release event lock?

I recommend that you review the documentation for synchronized, or perhaps this tutorial:



And as I have said to you before, do not use this unless you know what you are doing.  In this case, it seems clear that you don't, so I would recommend that you always use invokeLater as follows:


    UiApplication.getUiApplication().invokeLater(new Runnable() {
     public void run()

// your code goes in here