Skip to content

Add answer to exercise 8 chapter 3 #22

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Dec 14, 2015

Conversation

ssmylh
Copy link
Contributor

@ssmylh ssmylh commented Dec 8, 2015

@axel22 please check my answer.

// - In case of executing in sbt, set `fork` setting to `true` (set fork := true ).
def spawn[T](block: => T): T = {
val className = Ex8_EvaluationServer.getClass().getName().split((Pattern.quote("$")))(0)
val lines = Process(s"scala -cp ${System.getProperty("java.class.path")} $className").lineStream
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should also work with the java command.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(java is a little bit more likely to work, since JDK installations put java to PATH automatically, while running this through SBT does not require having Scala installed)

@ssmylh
Copy link
Contributor Author

ssmylh commented Dec 9, 2015

@axel22 Thanks for the speedy response !
I will try to do your comments.

@ssmylh
Copy link
Contributor Author

ssmylh commented Dec 11, 2015

@axel22 I have modified codes, please check them.

@ssmylh ssmylh changed the title Add answers to exercise 8 chapter 3 Add answer to exercise 8 chapter 3 Dec 12, 2015
axel22 added a commit that referenced this pull request Dec 14, 2015
Add answer to exercise 8 chapter 3
@axel22 axel22 merged commit c32364a into concurrent-programming-in-scala:master Dec 14, 2015
@axel22
Copy link
Member

axel22 commented Dec 14, 2015

LGTM - thanks!!

@ssmylh
Copy link
Contributor Author

ssmylh commented Dec 14, 2015

Thanks for a lot of advice. I appreciate it !

@ssmylh ssmylh deleted the ex8-ch3 branch December 14, 2015 13:06
ssmylh added a commit to ssmylh/cpinscala that referenced this pull request Dec 27, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants