<div dir="ltr">Destroyed seems confusing to me too, since the resource is not really destroyed. What about inert or unalive ?<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 19, 2015 at 2:34 PM, Bill Spitzak <span dir="ltr"><<a href="mailto:spitzak@gmail.com" target="_blank">spitzak@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I think the name "intact" is really confusing. Can it be instead called "destroyed"?<div class="HOEnZb"><div class="h5"><br>
<br>
On 03/19/2015 01:11 AM, Marek Chalupa wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
When server looses some capability (like pointer or keyboard),<br>
it takes some time to get this information to clients.<br>
When client sends request with new_id argument to the object<br>
that has been just destroyed on server-side (client<br>
does not know about it yet), we still have to create the resource.<br>
If we wouldn't do it then the client will get invalid id error once it<br>
tries to use the new object. But if we create it, then we have to<br>
take care that all the requests but destructor are ignored,<br>
because we do not have the server-side object anymore.<br>
(eventually, client will destroy the resource, because<br>
it will get the information about server-side object destruction)<br>
<br>
This patch solves this ugly race by adding wl_resource_set_intact()<br>
function that marks the resource as intact. When resource is intact<br>
it ignores all requests and events but destructors. The trick is in<br>
adding flag into the request's siganture that says: "hey! I'm<br>
destructor". Server then can skip non-destructor actions on intact<br>
resource.<br>
<br>
Programmer then can mark newly created resource as intact when<br>
this race come up instead of defining new implementation of<br>
resource just for this rare case.<br>
</blockquote>
<br>
</div></div></blockquote></div><br></div>