Jump to content

Is a Data copy made when dequeuing an element and requeueing somewhere else?


Recommended Posts

Hi Guys,

 

I've started sending some really big messages around my application and I was wondering if memory is allocated at each message handler? See the following code pic for an example:

post-16778-0-77034000-1389039924_thumb.p

 

More generally, what are the best ways to pass around massive data blocks (100s of MB) between processes?


Cheers,

Alex

Link to comment

Enqueue/Dequeue does not make a copy, so queues are a good choice here. Of course, if you enqueue data and continue to modify it at the same time, after it's already in the queue, then you'll force a copy because you'll need to have one copy in the queue and another to modify, so make sure that the wire ends at the enqueue. Preview Queue will make a copy of the data, since one copy needs to stay in the queue.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.