sendMsgNow(dst, addr m)
Is this really safe when m is located on the stack of proc startTest() ? I
don't know, but would worry.
In my test, I have this code:
type
TstMsg = Msg[int]
TstRep = Msg[float]
var dst: QueueID
initThreadID(ThreadID(0))
var m: TstMsg
m.content = 42
when USE_TOPICS:
initTopicID(TopicID(33))
let pid = myProcessID()
dst
Nice it simply that ! Thanks
Hi, I'm also using 0.17.2. Maybe I interpreted the problem incorrectly... I'll
use your example to check if it behaves differently in my code.
Your example seems to work fine with 0.17.2, idOfType is only called once per T
import typetraits
type
Message[T] = object
proc idOfType*(T: typedesc): int {.inline.} =
echo("Getting Id of type ", T.name)
when T is int:
0
else:
To make sure the messages in my message-queue are type-safe, I have to record
the message type in each message.
This is how I went about it:
proc idOfType*(T: typedesc): MsgTypeID {.inline.} =
let tid = 0 # Accesses "type register here" ...
MsgTypeID(tid)
proc s
Thanks for the quick answer but I have another question. How do you know the
name of the "buffer" you want to set ? The manual is not very clear about this.
Before we begin: I'm new to Nim and it's been a while since I did anything to
do with AST, parsing, etc. so my suggestions may be whacky. If they are, simply
say so and turn the discussion in the right direction.
**Where we're at**
List comprehension is currently available through the _future_
Use `raise` to terminate the program in a way that works with `finally`. It's
interesting that C++ does this correctly, we should probably do the same.
Theme font could be set by editing ~/.textadept/init.lua
>From
>[https://foicica.com/textadept/manual.html#Themes](https://foicica.com/textadept/manual.html#Themes)
buffer.set_theme() can also tweak theme properties like font face and font size
without editing the theme file itself:
buffer.set
Hi, I tried Textadept today I don't know where is the community so I ask here
because this editor supports Nim. I read all the API and manual during hours
and I didn't found how to set the default font size. Any help is welcome.
11 matches
Mail list logo