Skip to content

Instantly share code, notes, and snippets.

@shaxxx
Created November 21, 2014 09:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shaxxx/090f9e69b4bcbbfb8f69 to your computer and use it in GitHub Desktop.
Save shaxxx/090f9e69b4bcbbfb8f69 to your computer and use it in GitHub Desktop.
void Foo(String str)
{
class OneShotTask implements Runnable
{
String str;
OneShotTask(String s) { str = s; }
public void run()
{
someFunc(str);
}
}
Thread t = new Thread(new OneShotTask(str));
t.start();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment