Thread safety

Having problems with building or using the JCEF Java binding? Ask your questions here.

Thread safety

Postby LudovicG » Thu Jun 04, 2020 2:49 am

Hi,

I would be very interested to use java-cef in a project but I work in an environment where thread safety is critical and I need to make sure that JCEF is thread-safe but couldn't find much information on that topic.
From what I understand CEF is supposed to be thread-safe until specified otherwise so that would be nice, but what about the java wrapper:

1. Is the java code only serving as interface to the native library thus only passing parameters around and calling native functions or is it using extra steps and creating / storing new data and thus creating risks ?
2. Was the code written with thread safety in mind or is that supposed to be handled from outside the wrapper (only 1 thread interfacing with CEF objets) ?

Thanks in advance for any help on that matter.
LudovicG
Newbie
 
Posts: 5
Joined: Thu Jun 04, 2020 2:34 am

Re: Thread safety

Postby magreenblatt » Thu Jun 04, 2020 1:48 pm

LudovicG wrote:Was the code written with thread safety in mind

Yes. That said, we offer no guarantees with open source software. I strongly recommend that you test it for yourself to verify your use case.
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm

Re: Thread safety

Postby LudovicG » Tue Jun 09, 2020 2:10 am

Hi,

Thank you for the quick answer.
Let me ask one more question, would a threading issue in JCEF be considered a bug, and did issues of this kind occur in the past? Because I couldn't find any, which seem great.
LudovicG
Newbie
 
Posts: 5
Joined: Thu Jun 04, 2020 2:34 am

Re: Thread safety

Postby magreenblatt » Tue Jun 09, 2020 11:37 am

If the issue was in JCEF then it would be considered a bug. The intersection between Java AWT and platform thread requirements can sometimes be tricky to get right.
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm


Return to JCEF Forum

Who is online

Users browsing this forum: No registered users and 28 guests