{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaLang/Reactive.jl/issues/84","repository_url":"https://api.github.com/repos/JuliaLang/Reactive.jl","labels_url":"https://api.github.com/repos/JuliaLang/Reactive.jl/issues/84/labels{/name}","comments_url":"https://api.github.com/repos/JuliaLang/Reactive.jl/issues/84/comments","events_url":"https://api.github.com/repos/JuliaLang/Reactive.jl/issues/84/events","html_url":"https://github.com/JuliaLang/Reactive.jl/issues/84","id":133535775,"number":84,"title":"Problems with GLFW","user":{"login":"Gilga","id":4208274,"avatar_url":"https://avatars.githubusercontent.com/u/4208274?v=3","gravatar_id":"","url":"https://api.github.com/users/Gilga","html_url":"https://github.com/Gilga","followers_url":"https://api.github.com/users/Gilga/followers","following_url":"https://api.github.com/users/Gilga/following{/other_user}","gists_url":"https://api.github.com/users/Gilga/gists{/gist_id}","starred_url":"https://api.github.com/users/Gilga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gilga/subscriptions","organizations_url":"https://api.github.com/users/Gilga/orgs","repos_url":"https://api.github.com/users/Gilga/repos","events_url":"https://api.github.com/users/Gilga/events{/privacy}","received_events_url":"https://api.github.com/users/Gilga/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-02-14T12:36:24Z","updated_at":"2016-03-23T11:00:52Z","closed_at":null,"body":"System: Windows 8.1 (x64)\r\nJulia: 0.4.0\r\n\r\nwhen i use GLFW.PollEvents() and sleep(0.01) in a while loop it seems signals are not updated. sometimes it works and sometimes not. (this often happens when i move the glfw window. it just breaks and i get no more updates)\r\n\r\nMay its a common problem when using GLFW. Is there a workround for it?\r\n\r\nI use signals to check a file update, it prints me a msg when i change the file.\r\nCode:\r\n\r\n```\r\nfunction isUpdated(file::File, updatewhile=Reactive.Signal(true), update_interval=1.0)\r\n    fn = filename(file)\r\n    file_edited = foldp((false, mtime(fn)), fpswhen(updatewhile, 1.0/update_interval)) do v0, v1\r\n        time_edited = mtime(fn)\r\n        (!isapprox(0.0, v0[2] - time_edited), time_edited)\r\n    end\r\n    filter(identity, false, map(first, file_edited))\r\nend\r\n\r\nfunction watchFileUpdate(path::AbstractString, OnUpdate::Function)\r\n\tmap(isUpdated(query(path))) do _unused\r\n        println(\"OnUpdate: \", path)\r\n\tend\r\nend\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/JuliaLang/Reactive.jl/issues/comments/200296999","html_url":"https://github.com/JuliaLang/Reactive.jl/issues/84#issuecomment-200296999","issue_url":"https://api.github.com/repos/JuliaLang/Reactive.jl/issues/84","id":200296999,"user":{"login":"SimonDanisch","id":1010467,"avatar_url":"https://avatars.githubusercontent.com/u/1010467?v=3","gravatar_id":"","url":"https://api.github.com/users/SimonDanisch","html_url":"https://github.com/SimonDanisch","followers_url":"https://api.github.com/users/SimonDanisch/followers","following_url":"https://api.github.com/users/SimonDanisch/following{/other_user}","gists_url":"https://api.github.com/users/SimonDanisch/gists{/gist_id}","starred_url":"https://api.github.com/users/SimonDanisch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SimonDanisch/subscriptions","organizations_url":"https://api.github.com/users/SimonDanisch/orgs","repos_url":"https://api.github.com/users/SimonDanisch/repos","events_url":"https://api.github.com/users/SimonDanisch/events{/privacy}","received_events_url":"https://api.github.com/users/SimonDanisch/received_events","type":"User","site_admin":false},"created_at":"2016-03-23T11:00:52Z","updated_at":"2016-03-23T11:00:52Z","body":"If the latter is the case, how does the while loop look exactly?\r\nIf it's really just this:\r\n```Julia\r\nwhile !GLFW.WindowShouldClose(window)\r\nGLFW.PollEvents()\r\nsleep(0.01)\r\nend\r\n```\r\nYou would need a `yield()` in there."}}