Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Excercise 9-2  RSS feed

 
Glen Iris
Ranch Hand
Posts: 174
Chrome Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to synchronize a block of code as detailed on page 738/739.

I cannot figure out how to access the String that I pass to my MyThreaddy method on lines 9,10 and 11 of the below code.

I wish to access the letters 'a','b' or 'c', depending on the thread on line 33/34.


I hope somebody can help me. Thank you :-)
 
Henry Wong
author
Sheriff
Posts: 22843
119
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Glen Iris wrote:I am trying to synchronize a block of code as detailed on page 738/739.

I cannot figure out how to access the String that I pass to my MyThreaddy method on lines 9,10 and 11 of the below code.

I wish to access the letters 'a','b' or 'c', depending on the thread on line 33/34.


I hope somebody can help me. Thank you :-)



The second parameter to the constructor (in lines 9, 10, and 11) is for the name of the thread ... which you changed in line 13, 14,and 15.

Henry
 
Glen Iris
Ranch Hand
Posts: 174
Chrome Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Henry.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!