• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSOperation, Sqlite, library routine called out of sequence
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSOperation, Sqlite, library routine called out of sequence


  • Subject: Re: NSOperation, Sqlite, library routine called out of sequence
  • From: Тимофей Даньшин <email@hidden>
  • Date: Wed, 29 Apr 2009 23:45:13 +0400

Hm...
That really works! Thanks a lot.

Putting the bodies of those methods in @synchronized(self) blocks helped

Thanks a lot again.

On Apr 29, 2009, at 11:33 PM, Greg Guerin wrote:

Тимофей Даньшин wrote:

The DatabaseManager is synchronized. If any class is to communicate with the db, it does that through the DatabaseManager. The latter just provides proxy methods. I think, that should result in classes getting the instance of the DatabaseManager only when it is no longer (or not yet) used by other classes.


But that does nothing to prevent multiple threads from performing additional concurrent actions on the database. It's not enough to just control access to the shared singleton, if the actions performed by the singleton aren't also thread-safe. All the queries, updates, etc. need thread-safety, too.

 -- GG

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Re: NSOperation, Sqlite, library routine called out of sequence (From: Greg Guerin <email@hidden>)

  • Prev by Date: Re: NSOperation, Sqlite, library routine called out of sequence
  • Next by Date: Re: Binding question
  • Previous by thread: Re: NSOperation, Sqlite, library routine called out of sequence
  • Next by thread: Changing CoreData store type
  • Index(es):
    • Date
    • Thread