Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
leetcode
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Leona
W
web
backend
leetcode
Commits
05bef690
Commit
05bef690
authored
Nov 05, 2019
by
duanledexianxianxian
😁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init project
parent
6df3f402
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
leetcode1114/src/main/java/com/duanledexianxianxian/leetcode/Foo.java
.../src/main/java/com/duanledexianxianxian/leetcode/Foo.java
+5
-4
No files found.
leetcode1114/src/main/java/com/duanledexianxianxian/leetcode/Foo.java
View file @
05bef690
...
...
@@ -4,6 +4,7 @@ import java.util.concurrent.CountDownLatch;
/**
* Hello world!
* https://zhuanlan.zhihu.com/p/81626432
*
* @author Administrator
*/
...
...
@@ -38,12 +39,12 @@ class Foo {
}
public
static
void
main
(
String
[]
args
)
{
Foo
foo
=
new
Foo
();
Foo
foo
=
new
Foo
();
// 创建3个线程
Thread
thread1
=
new
Thread
(()
->
{
try
{
foo
.
first
(()
->
{
foo
.
first
(()
->
{
System
.
out
.
println
(
"1"
);
});
}
catch
(
InterruptedException
e
)
{
...
...
@@ -53,7 +54,7 @@ class Foo {
Thread
thread2
=
new
Thread
(()
->
{
try
{
foo
.
second
(()
->
{
foo
.
second
(()
->
{
System
.
out
.
println
(
"2"
);
});
}
catch
(
InterruptedException
e
)
{
...
...
@@ -63,7 +64,7 @@ class Foo {
Thread
thread3
=
new
Thread
(()
->
{
try
{
foo
.
third
(()
->
{
foo
.
third
(()
->
{
System
.
out
.
println
(
"3"
);
});
}
catch
(
InterruptedException
e
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment