eclipse-jdt / eclipse.jdt.debug

Eclipse Public License 2.0
16 stars 46 forks source link

Fix virtual machine hangs after 2x suspend vm breakpoint #321

Closed raghucssit closed 5 months ago

raghucssit commented 11 months ago

We need to initiate equal number of resume for suspend vm requests by threads.

Fixes https://github.com/eclipse-jdt/eclipse.jdt.debug/issues/320

raghucssit commented 5 months ago

Changed author as per my eclipse account. Rebased with master.

iloveeclipse commented 5 months ago

@raghucssit : I've reworked PR a bit, but the main idea is same & original fix was in right place, so main idea untouched.

Please review.

raghucssit commented 5 months ago

@raghucssit : I've reworked PR a bit, but the main idea is same & original fix was in right place, so main idea untouched.

  • get rid of the extra boolean flag
  • renamed counter and changed it to a thread safe AtomicInteger
  • added comments in code
  • slightly changed test

Please review.

Code changes looks good. I have pulled and did some manual testing, Everything works as expected. Good to merge.