{"action":"created","issue":{"url":"https://api.github.com/repos/perwendel/spark/issues/226","labels_url":"https://api.github.com/repos/perwendel/spark/issues/226/labels{/name}","comments_url":"https://api.github.com/repos/perwendel/spark/issues/226/comments","events_url":"https://api.github.com/repos/perwendel/spark/issues/226/events","html_url":"https://github.com/perwendel/spark/issues/226","id":52828281,"number":226,"title":"How to check that spark has started without polling?","user":{"login":"tchoulihan","id":930215,"avatar_url":"https://avatars.githubusercontent.com/u/930215?v=3","gravatar_id":"","url":"https://api.github.com/users/tchoulihan","html_url":"https://github.com/tchoulihan","followers_url":"https://api.github.com/users/tchoulihan/followers","following_url":"https://api.github.com/users/tchoulihan/following{/other_user}","gists_url":"https://api.github.com/users/tchoulihan/gists{/gist_id}","starred_url":"https://api.github.com/users/tchoulihan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tchoulihan/subscriptions","organizations_url":"https://api.github.com/users/tchoulihan/orgs","repos_url":"https://api.github.com/users/tchoulihan/repos","events_url":"https://api.github.com/users/tchoulihan/events{/privacy}","received_events_url":"https://api.github.com/users/tchoulihan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2014-12-24T17:03:03Z","updated_at":"2015-02-04T19:57:49Z","closed_at":null,"body":"I have a program that needs to load spark a 'get' resource, but only after spark has started\r\n\r\nso my current main is:\r\n````{\r\nspark.start();\r\nloadSparkURL();\r\n}````\r\n\r\nYet oftentimes, since I suppose spark uses an asynchronous start, the URL needs to be refreshed. Is there any way to check without polling that URL every so often? \r\n\r\n"},"comment":{"url":"https://api.github.com/repos/perwendel/spark/issues/comments/72926723","html_url":"https://github.com/perwendel/spark/issues/226#issuecomment-72926723","issue_url":"https://api.github.com/repos/perwendel/spark/issues/226","id":72926723,"user":{"login":"amarseillan","id":436540,"avatar_url":"https://avatars.githubusercontent.com/u/436540?v=3","gravatar_id":"","url":"https://api.github.com/users/amarseillan","html_url":"https://github.com/amarseillan","followers_url":"https://api.github.com/users/amarseillan/followers","following_url":"https://api.github.com/users/amarseillan/following{/other_user}","gists_url":"https://api.github.com/users/amarseillan/gists{/gist_id}","starred_url":"https://api.github.com/users/amarseillan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amarseillan/subscriptions","organizations_url":"https://api.github.com/users/amarseillan/orgs","repos_url":"https://api.github.com/users/amarseillan/repos","events_url":"https://api.github.com/users/amarseillan/events{/privacy}","received_events_url":"https://api.github.com/users/amarseillan/received_events","type":"User","site_admin":false},"created_at":"2015-02-04T19:57:49Z","updated_at":"2015-02-04T19:57:49Z","body":"Ok, I resolved it by waiting on a lock after starting the server thread. After the server initialization, before joining the threadpool, I notifyAll() on that lock... Best idea I had given the architecture.\r\n\r\nBetter ideas are accepted =P, i'll send in a PR.\r\n\r\nDoes it make sense to make this optional?? I don't think so but well..."}}