×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    May 2007
    Posts
    3

    Signalling AO from another thread

    Hi All,

    I am working on a messaging application that retreives data in the background. So far I have used AO extensively but now use data size has increased a lot. And also on retreiving that data we insert it in symbian database....which is taking a lot of time to write, also we are doing it in the RunL of AO...so its blocking the user inputs, key events.

    For this hanging issue I have created a thread which will be signalled by an AO on receiving data. This thread on being resumed will parse the data, insert it in database will again notify the concerned AO that it has done the job and now that AO can notify the UI by drawing, changing UI states etc...

    Now the issues is that when am trying to signal an AO in main thread from another thread that I have created. I went through various topics in the forum and found that one of the way of doing that is to create a default RThread object in the parent thread....and then use this handle to signal the AO of request completion from some other thread.

    for ex:-
    in thread I use the handle to primary process
    TRequestStatus* ptr = &iStatus;
    iPrimaryThread->RequestComplete(ptr,KErrNone);

    But it is not signalling the AO. Any Hints ? Is there any other way for implementing this kind of behaviour?

  2. #2
    Nokia Developer Champion
    Join Date
    Jul 2004
    Posts
    2,015

    Re: Signalling AO from another thread

    >. we are doing it in the RunL of AO...so its blocking the user inputs, key events.

    So you haven't read any of the documentation about breaking down long running active objects into smaller slices.

  3. #3
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,734

    Re: Signalling AO from another thread

    What is iStatus in this context?

  4. #4
    Registered User
    Join Date
    May 2007
    Posts
    3

    Re: Signalling AO from another thread

    Hi Thanks for replying,

    We doing the required processing in chunks in the active objects. For the past 2 years our application is working fine with this approach. And yes you are right...we should try to breaks the long processing in chunks in AO.

    But over the time our data size has increased a lot, say 400 - 500 kb. So even after breaking down the processing , the writing or storing of data in database takes long time (from 2 sec to 10 sec) on different-2 devices.

    So we have decided to give this approach a try.

    Any hints on how to break the database writing ?

  5. #5
    Registered User
    Join Date
    May 2007
    Posts
    3

    Re: Signalling AO from another thread

    iStaus is the request semaphore for the AO in the primary thread

Similar Threads

  1. Emulator crash immediatly after launched, SDK of S60 3nd
    By loopfinder in forum Symbian Tools & SDKs
    Replies: 27
    Last Post: 2011-01-30, 14:06
  2. S60 SDK 3rd edition FP1 Emulator problem
    By justteam in forum Symbian Tools & SDKs
    Replies: 14
    Last Post: 2010-03-23, 08:47
  3. console app running problem
    By xcompass in forum Symbian
    Replies: 3
    Last Post: 2009-05-08, 13:26
  4. Link errors when trying to Display bitmap
    By Bkc82 in forum Symbian Media (Closed)
    Replies: 1
    Last Post: 2006-01-16, 22:46

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×