This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 21416 - No definition for disentangle algorithm
Summary: No definition for disentangle algorithm
Status: RESOLVED FIXED
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-27 20:55 UTC by Alexey Proskuryakov
Modified: 2013-06-04 00:29 UTC (History)
2 users (show)

See Also:


Attachments

Description Alexey Proskuryakov 2013-03-27 20:55:23 UTC
An algorithm for entangling MessagePorts says that one may need to disentangle first, but nowhere it is defined how to disentangle ports.

----------------------------------
When the user agent is to entangle two MessagePort objects, it must run the following steps:

If one of the ports is already entangled, then disentangle it and the port that it was entangled with.

If those two previously entangled ports were the two ports of a MessageChannel object, then that MessageChannel object no longer represents an actual channel: the two ports in that object are no longer entangled.

Associate the two ports to be entangled, so that they form the two parts of a new channel. (There is no MessageChannel object that represents this channel.)
----------------------------------
Comment 1 Ian 'Hixie' Hickson 2013-03-28 21:57:30 UTC
What would the steps be?

"When the user agent is to disentangle two MessagePort objects, it must run the following steps:

 1. Disassociate the two ports to no longer be entangled."

That's more words, but I don't see what more it says than just "disentangle".
Comment 2 Alexey Proskuryakov 2013-03-28 22:08:54 UTC
It would be helpful to define "associate" and "disassociate" too. It's completely non-obvious to me what these mean when the ports are in separate threads or processes.

Does this mean something like "post a message to disassociate"?
Comment 3 Ian 'Hixie' Hickson 2013-04-14 06:58:14 UTC
Isn't that just an implementation detail?
Comment 4 contributor 2013-06-04 00:08:19 UTC
Checked in as WHATWG revision r7892.
Check-in comment: Let's try some more explanatory text
http://html5.org/tools/web-apps-tracker?from=7891&to=7892
Comment 5 Ian 'Hixie' Hickson 2013-06-04 00:29:01 UTC
marking fixed based on irc comments; feel free to reopen if you have any ideas how to make this better.