Login  Register

Re: My Application crashed

Posted by Sven Gothel on Jul 03, 2012; 1:52am
URL: https://forum.jogamp.org/My-Application-crashed-tp4025350p4025385.html

On 07/03/2012 02:36 AM, robbiezl [via jogamp] wrote:
> From the error log ,I just use TextRender,how to keep not to read my NIO
> Buffer while updateing from another thread I can not control?
>

synchronize the threads, i.e. block the resources while you are:
  - updating it
  - using it

You can use our 'RecursiveLock lock = LockFactory.createRecursiveLock();'
(look into our sources and API doc how to use it),
or you can use other means to sync threads as supported by Java.

~Sven


signature.asc (910 bytes) Download Attachment