Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 103069
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T01:03:55+00:00 2026-05-11T01:03:55+00:00

I have a situation where I’m starting a number of objects that, when they

  • 0

I have a situation where I’m starting a number of objects that, when they are ready to handle some input data, call a handler.

That handler gets a dataset from an ArrayCollection of pending requests, assigns it to the object, and removes the dataset from the ArrayCollection.

(I can’t pop from the ArrayCollection because I need to search through it to find an appropriate dataset – it isn’t always the one on top.)

Is it possible that two objects could call my handler in such a way that (1) the first is assigned a dataset, (2) the second is assigned the same dataset before the instance of the handler servicing the first has deleted it and I guess (3) the second instance of the handler errors on trying to delete the dataset from the ArrayCollection.

I’m not familiar enough with the Flash Player runtime to know if this failure scenario is even possible, or if I should take the extra time to put some sort of locking in place to prevent it.


Edit: The answers so far give glowing reviews for Flex, but I’m not sure they answer the question. To be clear, I’m not trying to decide whether or not to use Flex.

If I have a method that:

  1. Gets a piece of data from somewhere in an ArrayCollection
  2. Does something with that data
  3. Removes that data from the ArrayCollection

Is it possible that another invocation of that same method could do #1 after the first invocation does #1 but before it does #3?

le dorfier, you said that Flex/AS ‘just works’ – can you clarify that it will ‘just work’ in this case?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T01:03:56+00:00Added an answer on May 11, 2026 at 1:03 am

    You don’t need to do locking but you might want to track order of modifications to your state. Different async calls that are in play could return and modify your model state in an order that is different from when they async calls were issued.

    Flex and AIR applications have a single threaded programming model. However, their architecture relies on asynchronous I/O for interactions with the server-tier.

    Now in a Java Swing app or .NET Winforms app, one might do i/o interactions on a back-ground thread and marshal arguments/results to and from the main GUI thread. (Those graphical UI libraries do not permit other threads to change state of graphical toolkit objects/widgets, and hence data interactions must be marshaled to and from other background processing threads.)

    In contrast, the i/o class library of Flex and AIR is written where these classes implement i/o operations asynchronously. For instance, to do an HTTP GET, the HttpSerivce send() method can be invoked, which is not a blocking call. Instead an ActionScript3 closure can be supplied to handle the result whenever the call eventually completes and returns.

    In the meantime, the Flex/AIR app can permit the GUI to continue to be fully interactive to the user. It can even display a progress indicator and/or a Cancel button.

    So it turns out that even though the Flex/AIR single-threaded GUI model is simpler and easier to program than multi-threaded Java Swing or .NET Winform applications, it is capable of the same kind of sophisticated UI behavior as those style of rich client applications.

    A simple event-driven single threaded GUI, async i/o (via service calls and/or messaging), coupled with ActionScript3 closures for processing results or faults, is the Flex/AIR secret recipe for world domination. (Of course I should mention the good support for properties, events, and nice declarative – or imperative – data binding too as part of this world conquering strategy.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have a situation in our product where for a long time some data
I have situation, where running a query that filters by an indexed column in
I have situation where a user can manipulate a large set of data (presented
We have situation where say we have four engineers that are working on software
I have situation where I need to make sure that user has completed certain
I have situation where I have to call method of interface using reflection, like
I have situation where I have to handle multiple live UDP streams in the
i have situation in which i have some library projects, say DataProcessors,Lib2 , included
Possible Duplicate: What is my script src URL? I have situation: <script type=text/javascript src=http://server/some.js>
I have a situation where I currently have a huge spreadsheet that is used

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.