• 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: Locking problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Locking problem


  • Subject: Re: Locking problem
  • From: Florijan Stamenkovic <email@hidden>
  • Date: Mon, 13 Oct 2008 19:19:50 -0400

Hey Mike,

Thanks for replying. There is no practical equivalent of the RR loop on the client. While there is an RR loop during which the client asks the server for data, the client side EOF can be doing a lot of things outside of it. Because of that I kicked out lock coalescing. The relevant method in which that boolean is used now look like this:

protected void autoUnlock(boolean wasAutoLocked) {
		if (wasAutoLocked) {
			if (autoLocked) {
				unlock();
				autoLocked = false;
			}
		}
	}

I don't understand what you say about autoLocking being RR based. I thought that it was purely overriding based (since most methods call autoLock()). How is the RR loop influencing this process? In the stripped version of ERXEC I just made the assumption that useAutoLock is true, and left the rest as it was.

Also, I've found a reference to an "unlocker", but could not find a class having that in the name, nor any code reference to such a thing in ERXEC. Is it a class that does some locking magic ERXEC aside? Apparently the autolocking process is more complex then I thought. I expected something like:

public Object overriddenMethod(){
	Object result;
	try{
		lock();
		result = super.overridenMethod();
	}finally{
		unlock();
	}
	return result;
}

Is this to naive to work?

Thanks,
F


On Oct 13, 2008, at 16:47, Mike Schrag wrote:

I tried adapting ERXEC to a JC scenario. I stripped away the factory stuff, the delegate and properties (I made it always autoLock), as well as lock coalescing. However, it does not help. I get deadlocks and exceptions. There are two threads involved, one instance of my WorkerThread class and AWT's event dispatch thread (responsible for GUI painting).
Not sure how autolocking would work in Swing-land ... autolocking and lockcoalescing only work because of the concept of a request- response loop, which I'm assuming you don't have any concept of in JC. For web-based, it knows it can automatically unlock all your EC's at the end of the loop to prevent deadlocks, but I don't know what that equivalent trigger point would be in JC?

ms

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40mac.com


This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Locking problem
      • From: Mike Schrag <email@hidden>
References: 
 >Locking problem (From: Florijan Stamenkovic <email@hidden>)
 >Re: Locking problem (From: Mike Schrag <email@hidden>)

  • Prev by Date: Re: Locking problem
  • Next by Date: Re: Locking problem
  • Previous by thread: Re: Locking problem
  • Next by thread: Re: Locking problem
  • Index(es):
    • Date
    • Thread