Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [aspectj-users] flow of execution in different threads

For those of you who are interested - here is the output of a sample run
done on my PC.


? 	[main] leaf()
? 	[main] Aspect.<init>()
? 	[main] root()
? 	[main] void Main.leaf() state=Main[One]
? 	[main] leaf()
---> [main] create()
? 	[Thread-0] Aspect.<init>()
? 	[Thread-0] run()
? 	[Thread-0] void Main.leaf() state=Main[One]
? 	[Thread-0] leaf()
<--- [main] create()
? 	[main] leaf()
? 	[main] Aspect.<init>()
? 	[main] root()
? 	[main] void Main.leaf() state=Main[Two]
? 	[main] leaf()
---> [main] create()
? 	[Thread-1] Aspect.<init>()
? 	[Thread-1] run()
? 	[Thread-1] void Main.leaf() state=Main[Two]
? 	[Thread-1] leaf()
<--- [main] create()




-----Original Message-----
From: aspectj-users-admin@xxxxxxxxxxx
[mailto:aspectj-users-admin@xxxxxxxxxxx] On Behalf Of Matthew Webster
Sent: 18 March 2005 11:32
To: aspectj-users@xxxxxxxxxxx
Subject: Re: [aspectj-users] flow of execution in different threads


There have been a number of questions about determining cflow across threads
e.g. is a join point one thread in the control flow of a join point on the
thread that created me and can I pass context. Here is an example of how to
do it with read-only state. The Main class has 2 methods leaf() and root().
The "root()" method executes "leaf()" on another thread. We want to obtain
state in "leaf()" from earlier in the control flow, in this case an instance
of the Main class, which is done using a percflow aspect and a Hashmap. The
root, lead, create and run pointcuts could be customized or made abstract.
Comments welcomed:


* ** *** ** * ** *** ** * ** *** ** * 
This email and any files transmitted with it are confidential and 
intended solely for the use of the individual or entity to whom they 
are addressed. 
Any views or opinions presented are solely those of the author, and do not necessarily 
represent those of ESB. 
If you have received this email in error please notify the sender. 
 
Although ESB scans e-mail and attachments for viruses, it does not guarantee 
that either are virus-free and accepts no liability for any damage sustained 
as a result of viruses. 
 
* ** *** ** * ** *** ** * ** *** ** *



Back to the top