This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 252790 - Start lock isn't atomic
Summary: Start lock isn't atomic
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Launchers&CLI (show other bugs)
Version: 8.0.2
Hardware: PC Linux
: P3 normal (vote)
Assignee: Libor Fischmeistr
URL:
Keywords:
Depends on:
Blocks: 252789
  Show dependency tree
 
Reported: 2015-06-04 06:51 UTC by kalle1
Modified: 2017-10-03 20:45 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
messages.log of session with failure (33.86 KB, text/x-log)
2015-06-04 06:51 UTC, kalle1
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kalle1 2015-06-04 06:51:36 UTC
Created attachment 154047 [details]
messages.log of session with failure

It's possible to start multiple instances of `netbeans`.
Comment 1 kalle1 2017-10-03 20:45:06 UTC
This seems to be fixed.

```
#!/usr/bin/python

import subprocess as sp
import threading
import os

def netbeans_start_lock(sh="sh"):
    threads = []
    def __thread__():
        sp.check_call([sh, os.path.join(os.environ["HOME"], "netbeans-8.2", "bin", "netbeans")])
    for i in range(0,50):
        thread = threading.Thread(target=__thread__)
        thread.start()
        threads.append(thread)
    while len(threads) > 0:
        thread = threads.pop()
        thread.join()

if __name__ == "__main__":
    netbeans_start_lock()
```

only starts one instance.