{"action":"opened","issue":{"url":"https://api.github.com/repos/MightyPirates/OpenComputers/issues/1202","labels_url":"https://api.github.com/repos/MightyPirates/OpenComputers/issues/1202/labels{/name}","comments_url":"https://api.github.com/repos/MightyPirates/OpenComputers/issues/1202/comments","events_url":"https://api.github.com/repos/MightyPirates/OpenComputers/issues/1202/events","html_url":"https://github.com/MightyPirates/OpenComputers/issues/1202","id":85789771,"number":1202,"title":"Asynchronous signal signalling?","user":{"login":"SolraBizna","id":427857,"avatar_url":"https://avatars.githubusercontent.com/u/427857?v=3","gravatar_id":"","url":"https://api.github.com/users/SolraBizna","html_url":"https://github.com/SolraBizna","followers_url":"https://api.github.com/users/SolraBizna/followers","following_url":"https://api.github.com/users/SolraBizna/following{/other_user}","gists_url":"https://api.github.com/users/SolraBizna/gists{/gist_id}","starred_url":"https://api.github.com/users/SolraBizna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SolraBizna/subscriptions","organizations_url":"https://api.github.com/users/SolraBizna/orgs","repos_url":"https://api.github.com/users/SolraBizna/repos","events_url":"https://api.github.com/users/SolraBizna/events{/privacy}","received_events_url":"https://api.github.com/users/SolraBizna/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-06T18:12:26Z","updated_at":"2015-06-06T18:12:26Z","closed_at":null,"body":"The emulator at the core of my ARM architecture has support for asynchronous IRQs/FIQs. I intend to use one to indicate the presence of a signal, and the other to indicate the arrival of a certain Minecraft world time. The latter can be simulated adequately without extra support from OpenComputers, but the former has a large amount of response latency if it can only be updated at `runThreaded()` boundaries, and burns a lot of cycles if it must be polled.\r\n\r\nI propose adding a method to the Architecture interface that is called (from the delivering thread) whenever a signal is delivered to the machine. The Architecture would be responsible for any synchronization or special handling necessary to make this work. The computer would still need to pull the signal by existing means to find out anything about it; this call would merely signal that a signal exists. The Lua architecture (and most others, I imagine), lacking any way to support asynchronous signalling of the running program, would simply ignore the call. The ARM architecture, on the other hand, could make use of this information to provide more \"snappy\" signal response.\r\n\r\nThis is low priority. Asynchronous IRQ delivery is hardly a killer feature, and I still haven't even gotten Lua working well on the emulated machine. (P.S. Heap corruption is a lot harder to track down in a new kernel than in a program for an existing OS...)"}}