{"action":"created","issue":{"url":"https://api.github.com/repos/arton/FireRuby/issues/1","labels_url":"https://api.github.com/repos/arton/FireRuby/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/arton/FireRuby/issues/1/comments","events_url":"https://api.github.com/repos/arton/FireRuby/issues/1/events","html_url":"https://github.com/arton/FireRuby/pull/1","id":55390975,"number":1,"title":"ChromeWorkers","user":{"login":"aplicacionamedida","id":9158583,"avatar_url":"https://avatars.githubusercontent.com/u/9158583?v=3","gravatar_id":"","url":"https://api.github.com/users/aplicacionamedida","html_url":"https://github.com/aplicacionamedida","followers_url":"https://api.github.com/users/aplicacionamedida/followers","following_url":"https://api.github.com/users/aplicacionamedida/following{/other_user}","gists_url":"https://api.github.com/users/aplicacionamedida/gists{/gist_id}","starred_url":"https://api.github.com/users/aplicacionamedida/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aplicacionamedida/subscriptions","organizations_url":"https://api.github.com/users/aplicacionamedida/orgs","repos_url":"https://api.github.com/users/aplicacionamedida/repos","events_url":"https://api.github.com/users/aplicacionamedida/events{/privacy}","received_events_url":"https://api.github.com/users/aplicacionamedida/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-01-25T00:54:52Z","updated_at":"2015-09-24T20:26:10Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/arton/FireRuby/pulls/1","html_url":"https://github.com/arton/FireRuby/pull/1","diff_url":"https://github.com/arton/FireRuby/pull/1.diff","patch_url":"https://github.com/arton/FireRuby/pull/1.patch"},"body":"Hi Akio Tajima,\r\nI made some improvement in FireRuby. I use ChromeWorkers, which are threads on the Chrome. There is also WebWorkers, which are threads but not in the Chrome. Threads are useful for cpu intensive tasks, because otherwise you freeze the GUI. Try for example a sleep in your FireRuby. The GUI is not responsive. You can check this including a button and attaching an alert to the click event. Clicking the button no alerts fires. But with ChromeWorkers this problem is solved. It's necessary to use ChromeWorkers instead of Webworkers, because we use the XPCOM js-ctypes. Using XPCOM components is only possible on the chrome.\r\n\r\nFor the communication on the other side, from the secondary thread to the main thread I use postMessage().\r\n\r\nI also tried different tricks to extract the pointer address of a function in javascript, in this case ruby_postMessage(), which is connected to the postMessage() method. This address is passed to the main.rb script. I extracted this address using the string representation of the javascript object.\r\n\r\nI think that it's totally possible to code hybrid web apps using xulrunner embedding an interpreter.\r\n\r\nBest regards,\r\nMiguel."},"comment":{"url":"https://api.github.com/repos/arton/FireRuby/issues/comments/143041743","html_url":"https://github.com/arton/FireRuby/pull/1#issuecomment-143041743","issue_url":"https://api.github.com/repos/arton/FireRuby/issues/1","id":143041743,"user":{"login":"aplicacionamedida","id":9158583,"avatar_url":"https://avatars.githubusercontent.com/u/9158583?v=3","gravatar_id":"","url":"https://api.github.com/users/aplicacionamedida","html_url":"https://github.com/aplicacionamedida","followers_url":"https://api.github.com/users/aplicacionamedida/followers","following_url":"https://api.github.com/users/aplicacionamedida/following{/other_user}","gists_url":"https://api.github.com/users/aplicacionamedida/gists{/gist_id}","starred_url":"https://api.github.com/users/aplicacionamedida/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aplicacionamedida/subscriptions","organizations_url":"https://api.github.com/users/aplicacionamedida/orgs","repos_url":"https://api.github.com/users/aplicacionamedida/repos","events_url":"https://api.github.com/users/aplicacionamedida/events{/privacy}","received_events_url":"https://api.github.com/users/aplicacionamedida/received_events","type":"User","site_admin":false},"created_at":"2015-09-24T20:26:10Z","updated_at":"2015-09-24T20:26:10Z","body":"Thanks for your reassuring message about the future of firefox. I want to provide a debugging tool for Tcl code evaluation in an external editor. I will change also the code of the clipboard. I want to add also a task manager for the Tcl code evalution in workers. What's your email? My email is at the end of the README file of my library."}}