reestructurando el codigo e incorporando las librerias de active2

master
DEV 2 years ago
parent 321b4df295
commit 79be1b70b2

@ -24,8 +24,8 @@
package cjson
import (
"codecs/base32"
"codecs/base64"
"cdcs/base32"
"cdcs/base64"
"math"
"mems"
"strconv"

@ -21,7 +21,7 @@
// limitations under the License.
// ------------------------------------------------------------------------
package crypts
package crps
import "errs"

@ -21,7 +21,7 @@
// limitations under the License.
// ------------------------------------------------------------------------
package crypts
package crps
type (

@ -21,14 +21,14 @@
// limitations under the License.
// ------------------------------------------------------------------------
package crypts
package crps
import "results"
import "rsls"
type (
Decrypter interface {
Decrypt (data []byte) results.Bytes
Decrypt (data []byte) rsls.Bytes
}
@ -38,6 +38,6 @@ type (
func (_ DecrypterNop) Decrypt (_ []byte) results.Bytes {
return results.MakeBytesError(G.ErrNotImplemented) }
func (_ DecrypterNop) Decrypt (_ []byte) rsls.Bytes {
return rsls.MakeBytesError(G.ErrNotImplemented) }

@ -21,15 +21,15 @@
// limitations under the License.
// ------------------------------------------------------------------------
package crypts
package crps
import "results"
import "rsls"
type (
Encrypter interface {
Encrypt (data []byte) results.Bytes
Encrypt (data []byte) rsls.Bytes
}
@ -38,5 +38,5 @@ type (
)
func (_ EncrypterNop) Encrypt (_ []byte) results.Bytes {
return results.MakeBytesError(G.ErrNotImplemented) }
func (_ EncrypterNop) Encrypt (_ []byte) rsls.Bytes {
return rsls.MakeBytesError(G.ErrNotImplemented) }

@ -23,7 +23,7 @@
package bdates
import "times"
import "dtes"
type (

@ -21,7 +21,7 @@
// limitations under the License.
// ------------------------------------------------------------------------
package results
package rsls
type (

@ -21,7 +21,7 @@
// limitations under the License.
// ------------------------------------------------------------------------
package results
package rsls
type (

@ -21,7 +21,7 @@
// limitations under the License.
// ------------------------------------------------------------------------
package results
package rsls
type (

@ -21,7 +21,7 @@
// limitations under the License.
// ------------------------------------------------------------------------
package results
package rsls
type (

@ -21,7 +21,7 @@
// limitations under the License.
// ------------------------------------------------------------------------
package results
package rsls
type (

@ -25,12 +25,13 @@ package ctasks
import (
"context"
"crns"
"opts"
"sync"
"sync/atomic"
"syncs/works"
"syns/works"
"time"
cronus "timers"
)
type (
@ -41,7 +42,7 @@ type (
wgr sync.WaitGroup
parent Context
expiration *cronus.Expiration
expiration *crns.Expiration
mode Mode
state uint32
@ -77,7 +78,7 @@ func NewCompletion (options ...CompletionFnc) (*Completion,error) {
}
}
if c.expiration == nil {
c.expiration = cronus.NewExpiration(0,nil)
c.expiration = crns.NewExpiration(0,nil)
}
return c,nil
}
@ -96,7 +97,7 @@ func (c *Completion) IsCompleted () bool {
return c.State() > StateStarted
}
func (c *Completion) Chrono () cronus.Chronometer {
func (c *Completion) Chrono () crns.Chronometer {
return c.expiration.Chono() }
func (c *Completion) Result () Result {
@ -147,7 +148,7 @@ func (c *Completion) complete (ctx context.Context, cctx Context, cid int) error
// en tiempo de la completion en caso de que exista, o bien de la
// completion padre o bien del contexto.
//
var ex cronus.Expirer
var ex crns.Expirer
if cctx != nil {
c.parent = cctx
@ -330,7 +331,7 @@ func WithMode (mode Mode) opts.GOptionErrFnc[Completion] {
//
func WithTimeout (tmo time.Duration) opts.GOptionErrFnc[Completion] {
return func(c *Completion) error {
c.expiration = cronus.NewExpiration(tmo,func(){
c.expiration = crns.NewExpiration(tmo,func(){
c.notify(CompletionFromTimer, StateCanceled,nil,G.ErrCancelByTimer)
})
return nil

@ -25,13 +25,13 @@ package queue
import (
"sync"
"syncs"
"syns"
)
type (
GQueue [T any]struct {
locker syncs.LockerRW
locker syns.LockerRW
elems []T
}
@ -39,11 +39,11 @@ type (
func NewGQueue [T any](safe bool) *GQueue[T] {
var lc syncs.LockerRW
var lc syns.LockerRW
if safe {
lc = &sync.RWMutex{}
} else {
lc = syncs.NopLocker{}
lc = syns.NopLocker{}
}
return &GQueue[T]{ locker : lc }
}

@ -28,7 +28,7 @@ import (
"runtime"
"sync"
"sync/atomic"
"syncs/pools"
"syns/pools"
"time"
)

@ -13,5 +13,11 @@ use (
./core/opts
./core/syns
./core/typs
./core/dtes
./core/cdcs
./core/crps
./core/crns
./core/rsls
./core/ctxs
)

Loading…
Cancel
Save

Powered by TurnKey Linux.