W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2011

Re: What changes to Web Messaging spec are proposed? [Was: Re: Using ArrayBuffer as payload for binary data to/from Web Workers]

From: Glenn Maynard <glenn@zewt.org>
Date: Fri, 3 Jun 2011 03:20:58 -0400
Message-ID: <BANLkTik3s6NN9A4yvRVa9ygWJ-EzWJhWNQ@mail.gmail.com>
To: Dmitry Lomov <dslomov@chromium.org>
Cc: Jonas Sicking <jonas@sicking.cc>, David Levin <levin@chromium.org>, Kenneth Russell <kbr@google.com>, ben turner <bent.mozilla@gmail.com>, "public-webapps@w3.org" <public-webapps@w3.org>
On Fri, Jun 3, 2011 at 2:44 AM, Dmitry Lomov <dslomov@chromium.org> wrote:
>> Now show me the code needed to send a message which contains one big
>> buffer from you that you want to transfer, along with some data that
>> you got from some other piece of code and which you do not want to
>> modify and which may or may not contain ArrayBuffers.
> I think this can be reversed: what if you got some data from some other
> piece of code that you do not really control and you want to transfer (i.e.
> transfer all the ArrayBuffers that are inside that data)?
> As in, the library gives you two methods, compute() that returns data and
> present(data) that presents it, and you want to pass data from worker to
> main thread without really caring what is inside that data.

One possibility would be, in addition to instances of object, to also
allow providing the object constructor, indicating that all objects of
that type should be transferred if supported.  {transfer:
[ArrayBuffer, ImageData]}

Glenn Maynard
Received on Friday, 3 June 2011 07:21:26 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:26:32 UTC