This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "fmt" | |
/** | |
* Definition for singly-linked list. | |
*/ | |
type ListNode struct { | |
Val int | |
Next *ListNode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class LockTest { | |
@Autowired | |
private LockService lockService; | |
@Test | |
public void testGetKey throws Exception { | |
for (int i = 0; i < 10; i++) { | |
final int request = i; | |
new Thread(() -> { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.UUID; | |
import java.util.concurrent.TimeUnit; | |
/** | |
* Created by huangxx on 2017/6/27. | |
*/ | |
@Service | |
@Log4j2 | |
public class LockKeyService { |