{"action":"created","issue":{"url":"https://api.github.com/repos/aantron/lwt_glib/issues/3","repository_url":"https://api.github.com/repos/aantron/lwt_glib","labels_url":"https://api.github.com/repos/aantron/lwt_glib/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/aantron/lwt_glib/issues/3/comments","events_url":"https://api.github.com/repos/aantron/lwt_glib/issues/3/events","html_url":"https://github.com/aantron/lwt_glib/issues/3","id":327727688,"node_id":"MDU6SXNzdWUzMjc3Mjc2ODg=","number":3,"title":"Calling g_main_context_dispatch in a thread ?","user":{"login":"zoggy","id":515002,"node_id":"MDQ6VXNlcjUxNTAwMg==","avatar_url":"https://avatars0.githubusercontent.com/u/515002?v=4","gravatar_id":"","url":"https://api.github.com/users/zoggy","html_url":"https://github.com/zoggy","followers_url":"https://api.github.com/users/zoggy/followers","following_url":"https://api.github.com/users/zoggy/following{/other_user}","gists_url":"https://api.github.com/users/zoggy/gists{/gist_id}","starred_url":"https://api.github.com/users/zoggy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zoggy/subscriptions","organizations_url":"https://api.github.com/users/zoggy/orgs","repos_url":"https://api.github.com/users/zoggy/repos","events_url":"https://api.github.com/users/zoggy/events{/privacy}","received_events_url":"https://api.github.com/users/zoggy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-05-30T13:20:19Z","updated_at":"2018-06-04T16:57:23Z","closed_at":null,"author_association":"NONE","body":"Since `g_main_context_dispatch` is called in the main Lwt thread, the callbacks associated to Gtk events cannot call Lwt functions. Do you think it would be possible to call this function in a detached thread (using Lwt_preemptive.detach), so that callbacks could call `Lwt_preemptive.run_in_main` ? It may not be wishable for all applications, so this would have to be optional. And I don't know if Glib would be happy with this."},"comment":{"url":"https://api.github.com/repos/aantron/lwt_glib/issues/comments/394425591","html_url":"https://github.com/aantron/lwt_glib/issues/3#issuecomment-394425591","issue_url":"https://api.github.com/repos/aantron/lwt_glib/issues/3","id":394425591,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NDQyNTU5MQ==","user":{"login":"zoggy","id":515002,"node_id":"MDQ6VXNlcjUxNTAwMg==","avatar_url":"https://avatars0.githubusercontent.com/u/515002?v=4","gravatar_id":"","url":"https://api.github.com/users/zoggy","html_url":"https://github.com/zoggy","followers_url":"https://api.github.com/users/zoggy/followers","following_url":"https://api.github.com/users/zoggy/following{/other_user}","gists_url":"https://api.github.com/users/zoggy/gists{/gist_id}","starred_url":"https://api.github.com/users/zoggy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zoggy/subscriptions","organizations_url":"https://api.github.com/users/zoggy/orgs","repos_url":"https://api.github.com/users/zoggy/repos","events_url":"https://api.github.com/users/zoggy/events{/privacy}","received_events_url":"https://api.github.com/users/zoggy/received_events","type":"User","site_admin":false},"created_at":"2018-06-04T16:57:23Z","updated_at":"2018-06-04T16:57:23Z","author_association":"NONE","body":"For Gtk callbacks, most of the time I can use Lwt.async but I can think of somes case where I would like to wait for IO operations to terminate. I will give a try to the detached thread / run_in_main approach. I am AFK most of the time, though, so don't hold your breath."}}
{"actor":{"display_login":"zoggy"}}