(
state: &mut State<'gc>,
_args: Vec<Value<'gc>>,
)
| 196 | } |
| 197 | |
| 198 | pub(super) fn begin_pipeline<'gc>( |
| 199 | state: &mut State<'gc>, |
| 200 | _args: Vec<Value<'gc>>, |
| 201 | ) -> Result<Value<'gc>, VmError> { |
| 202 | let has_active = ACTIVE_PIPELINE.with(|tx| tx.borrow().is_some()); |
| 203 | if has_active { |
| 204 | return Err(VmError::RuntimeError("Pipeline already active".into())); |
| 205 | } |
| 206 | |
| 207 | // Create new pipeline |
| 208 | let pipeline = redis::pipe(); |
| 209 | ACTIVE_PIPELINE.with(|cell| { |
| 210 | *cell.borrow_mut() = Some(pipeline); |
| 211 | }); |
| 212 | |
| 213 | let ctx = state.get_context(); |
| 214 | let instance = Instance::new(create_pipeline_class(ctx)); |
| 215 | Ok(Value::Instance(Gc::new(&ctx, RefLock::new(instance)))) |
| 216 | } |
| 217 | |
| 218 | fn cmd<'gc>(_state: &mut State<'gc>, args: Vec<Value<'gc>>) -> Result<Value<'gc>, VmError> { |
| 219 | if args.is_empty() { |
nothing calls this directly
no test coverage detected