I think we should use void* as token since it represents object identity. This also avoids the cast in the layer_producer