-
Notifications
You must be signed in to change notification settings - Fork 1
/
doc.go
58 lines (42 loc) · 1.8 KB
/
doc.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/*
* Copyright 2015 Fabrício Godoy
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
Package dot provides implementation of basic common tasks.
Disposable
A Disposable defines a predictable way of releasing resources that cannot be
handled by garbage collector as open files and streams.
Call Dispose function when the object is no longer needed and its allocated
resources can be released.
Can be used in conjunction of Using function to define a execution block and
automatically release allocated resources at the end of the block.
LockStatus
A LockStatus defines values for expected lock status for a lockable object.
MulticastDispose
A MulticastDispose allows to register multiple Dispose functions on a single
Disposable object (itself).
Very useful as returning object of a function that allocates several Disposable
objects.
Using
A Using function allows to define a execution block for a Disposable object to
automatically release allocated resources at the end of the function/block.
WaitFunc
A WaitFunc function allows to synchronously waits for a function until it
returns true or until a specified timeout is reached.
WaitPeerListening
A WaitPeerListening function allows to synchronously waits for a peer until it
is ready for new connections or until a specified timeout is reached.
*/
package dot