mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
all: replace "NB:" with "Note:" (docs/comments)
This commit is contained in:
@ -39,7 +39,7 @@ fn do_rec(ch chan int, id int, mut ctx Context) {
|
||||
mut timer_sw_x := time.new_stopwatch()
|
||||
mut tmp := int(0)
|
||||
mut i := int(0)
|
||||
// NB: a single receiver thread can get slightly more
|
||||
// Note: a single receiver thread can get slightly more
|
||||
// than its fair share of sends, that is why
|
||||
// the receiver's Event array is much larger,
|
||||
// enough so a single receiver can potentially process all
|
||||
|
@ -1,6 +1,6 @@
|
||||
import sync
|
||||
|
||||
// NB: this is the same test as `vlib/sync/once_test.v`, but
|
||||
// Note: this is the same test as `vlib/sync/once_test.v`, but
|
||||
// it uses an explicit passing of the voidptr parameter in
|
||||
// once.do_with_param/2, instead of passing a closure of it
|
||||
// in once.do/1.
|
||||
|
@ -42,7 +42,7 @@ fn test_work_on_strings() {
|
||||
}
|
||||
|
||||
fn test_work_on_ints() {
|
||||
// NB: since maxjobs is left empty here,
|
||||
// Note: since maxjobs is left empty here,
|
||||
// the pool processor will use njobs = runtime.nr_jobs so that
|
||||
// it will work optimally without overloading the system
|
||||
mut pool_i := pool.new_pool_processor(
|
||||
|
@ -5,7 +5,7 @@ module stdatomic
|
||||
//
|
||||
// On windows tcc can simulate with other atomic operations.
|
||||
//
|
||||
// NB: this implementations should be regarded as alpha stage and be tested
|
||||
// Note: this implementations should be regarded as alpha stage and be tested
|
||||
// much more.
|
||||
|
||||
// add_u64 adds provided delta as an atomic operation
|
||||
|
@ -32,7 +32,7 @@ fn test_count_10_times_1_cycle_should_not_be_10_cycles_without_sync() {
|
||||
go count_one_cycle_without_sync(mut counter, mut wg)
|
||||
}
|
||||
wg.wait()
|
||||
// NB: we do not assert here, just print, because sometimes by chance counter.counter may be == desired_iterations
|
||||
// Note: we do not assert here, just print, because sometimes by chance counter.counter may be == desired_iterations
|
||||
eprintln('without synchronization the counter is: ${counter.counter:10} , expectedly != ${desired_iterations:10}')
|
||||
}
|
||||
|
||||
|
@ -5,7 +5,7 @@ module threads
|
||||
// See vlib/v/parser/pratt.v, search for ast.GoExpr .
|
||||
// The goal is that programs, that do not use threads at all will not need
|
||||
// to link to -lpthread etc.
|
||||
// NB: on some platforms like Android, linking -lpthread is not needed too.
|
||||
// Note: on some platforms like Android, linking -lpthread is not needed too.
|
||||
// See https://stackoverflow.com/a/31277163/1904615
|
||||
|
||||
$if !windows && !android {
|
||||
|
Reference in New Issue
Block a user