w3c / requestidlecallback

Cooperative Scheduling of Background Tasks
https://w3c.github.io/requestidlecallback/
Other
50 stars 19 forks source link

Are we sure we want integer handles? #26

Closed bzbarsky closed 8 years ago

bzbarsky commented 8 years ago

The use of unsigned long handles is problematic. I thought we had this conversation with requestAnimationFrame too, and am not sure why it went with them after all, but there are two main problems: (a) You have to deal with overflow of the counter (which specs tend to not do, somehow) and (b) You can cancel other people's requests (or indeed all of them).

Vending some sort of guaranteed-unforgeable handles might be a better approach. Or we could keep the integer handles for consistency with all the other broken timing callback APIs we have in the platform, I guess...

rmcilroy commented 8 years ago

The use of integer handles here was modivated by consistency with the other timing callback APIs. Personally I agree that vending unforgeable handles might be a better approach, but I also think consistency with the other timing APIs is important.

igrigorik commented 8 years ago

The use of integer handles here was modivated by consistency with the other timing callback APIs. Personally I agree that vending unforgeable handles might be a better approach, but I also think consistency with the other timing APIs is important.

Ditto.

igrigorik commented 8 years ago

Closing. Please feel free to reopen if this needs further action.